Commits
- Commit:
a0d281d3feca69fed7debcf99049df9252a80893
- From:
- Sergey Bronnikov <sergeyb@tarantool.org>
- Date:
datetime: fix values of unspecified fields in dt.parse()
datetime object can be created using `datetime.new()` and
`datetime.parse()`. `datetime.new()` sets values of unspecified
fields to appropriate values of fields in a Unix time
(00:00:00 UTC on 1 January 1971, Thursday), see commit
43e10ed34949 ("build, lua: built-in module datetime"):
```
tarantool> datetime.new()
---
- 1970-01-01T00:00:00Z
...
tarantool> datetime.new():totable()
---
- sec: 0
min: 0
yday: 1
day: 1
nsec: 0
isdst: false
wday: 5
tzoffset: 0
month: 1
year: 1970
hour: 0
```
The function `datetime.parse` converts an input string with the
date and time information into a datetime object. When fields are
not specified in a input string their values becomes undefined:
```
tarantool> dt.parse('01:01:01', {format ='%H:%M:%S'}):totable()
---
- sec: -59
min: -58
yday: 366
day: 31
nsec: 0
isdst: false
wday: 1
tzoffset: 0
month: 12
year: 0
hour: -22
...
tarantool>
```
The commit fixes aforementioned behaviour of `datetime.parse()`
by setting values for fields not specified by user to values of
appropriate fields of Unix time.
NO_DOC=bugfix
Fixes #8588
(cherry picked from commit 9ac56a1222e916951010091fbdbfc497f4a4971d)
- Commit:
f704c7cd828d23406319acbae58086dfb940810a
- From:
- Georgiy Belyanin <belyaningeorge@ya.ru>
- Via:
- Alexander Turenko <totktonada.ru@gmail.com>
- Date:
lua-yaml: wrap large doubles in quotes
Since tarantool/luajit@a16313f large exponent double strings are not
considered convertible to number. It broke encoding lua objects to YAML
because single quotes weren't considered necessary for decoding.
This commit adds wrapping of every string containing infinite double values
into a single quotes.
Closes #10164
NO_DOC=bug fix
(cherry picked from commit 7c3f42590240525d2e543305b6c289ddb30054a2)
- Commit:
07f5791b90e865ea0b19f07d2d3746ddd41ded3f
- From:
- Maksim Tiushev <mandesero@gmail.com>
- Via:
- Alexander Turenko <totktonada.ru@gmail.com>
- Date:
uri: uri.format encapsulate IPv6 address in []
This patch adds encapsulation for IPv6 addresses in brackets when
calling uri.format (as per RFC 2732).
Closes #9556
NO_DOC=bugfix
(cherry picked from commit a49ec23b85edb684744eb525427465dfa4f660e1)
- Commit:
46250b465f87ef092e595f687eec6e2095bef8d7
- From:
- Maksim Tiushev <mandesero@gmail.com>
- Via:
- Alexander Turenko <totktonada.ru@gmail.com>
- Date:
uri: fix parsing uppercased IPv6 addresses
Before this patch `uri.parse(<uri-string-with-ipv6-addres>)`
did not work correctly. In particular, it did not parse an
IPv6 address if it contained `A-F`. It is a regression caused
by commit 1376aad9b3fd ("Refactor src/uri.rl to support RFC3986
and add Lua bindings").
This patch fixes a bug where characters `A-F` are not
supported in IPv6.
Part of #9556
NO_DOC=bugfix
(cherry picked from commit 2eefc56a3e08a60f0b71e33621be851794131546)
- Commit:
e05fe5fe7eb21226fe1262f60043bd44ce1827ec
- From:
- Alexander Turenko <alexander.turenko@tarantool.org>
- Via:
- Alexander Turenko <totktonada.ru@gmail.com>
- Date:
uri: mark the parser source file as generated
The motivation is to exclude the file from diffs on GitHub's web
interface [1] and to exclude it from checkpatch checks [2].
[1]: https://docs.github.com/en/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github
[2]: https://github.com/tarantool/checkpatch/pull/75
NO_DOC=the patch is about the development process, it doesn't change
anything in the shipped product
NO_CHANGELOG=see NO_DOC
NO_TEST=see NO_DOC
(cherry picked from commit fbea9862b087e161a48dc0ac181a1da06cc0ce9d)