Commits
- Commit:
73e02b2ad65e31ea6e9ef8a6b42807e4dc042115
- From:
- Sergey Bronnikov <sergeyb@tarantool.org>
- Date:
datetime: support tz field in :totable()
`datetime` module has a function `:totable()` that converts
the information from a datetime object into the table format.
The commit 43e10ed34949 ("build, lua: built-in module datetime")
added `tzoffset` field to the datetime object and to table
produced by `:totable()`. The commit 9ee45289e012
("datetime: datetime.TZ array") added fields `tz` and `tzindex` to
the datetime object, but not to the table produced by
`:totable()`. The patch fixes that. Note, `tzindex` is not added,
because it is an internal field.
```
tarantool> datetime.parse('2004-12-01T00:00 Europe/Moscow'):totable()
---
- tz: Europe/Moscow
sec: 0
min: 0
yday: 336
day: 1
nsec: 0
isdst: false
wday: 4
tzoffset: 180
month: 12
year: 2004
hour: 0
...
```
Fixes #10331
Follows up #6751
@TarantoolBot document
Title: Support of tz field in :totable()
In addition to the `tzoffset` in a table produced by `:totable`
we added `tz` field.
```
tarantool> datetime.parse('2004-12-01T00:00 Europe/Moscow'):totable()
---
- tz: Europe/Moscow
sec: 0
min: 0
yday: 336
day: 1
nsec: 0
isdst: false
wday: 4
tzoffset: 180
month: 12
year: 2004
hour: 0
...
```
- Commit:
625afe418151de1015483ed24acaa57e1f85efb3
- From:
- Sergey Bronnikov <sergeyb@tarantool.org>
- Via:
- Sergey Kaplun <sergey_v_kaplun@mail.ru>
- Date:
datetime: remove unused function datetime_gmtoff
The function `datetime_gmtoff()` has been introduced in commit
aec6fbac1f22 ("datetime: implement date.isdst") for a function
`datetime_increment_by()`. In commit 6ca072853034
("datetime: fix interval arithmetic for DST") the function
`datetime_increment_by()` has been updated and call of the
function `datetime_gmtoff()` was removed. `datetime_gmtoff` is
dead code now. The patch removes `datetime_gmtoff()`.
NO_CHANGELOG=codehealth
NO_DOC=codehealth
NO_TEST=codehealth
- Commit:
c9c5b9f139ccbf5372d1568827fbb50bec7239bb
- From:
- Sergey Bronnikov <sergeyb@tarantool.org>
- Via:
- Sergey Kaplun <sergey_v_kaplun@mail.ru>
- Date:
datetime: fix typos
The patch fixes a number of typos in datetime source code.
NO_CHANGELOG=codehealth
NO_DOC=codehealth
NO_TEST=codehealth
- Commit:
9ac56a1222e916951010091fbdbfc497f4a4971d
- From:
- Sergey Bronnikov <sergeyb@tarantool.org>
- Via:
- Sergey Kaplun <sergey_v_kaplun@mail.ru>
- 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
- Commit:
93fb2363cb45dc47a94eb221d5904b8b823e614d
- From:
- DerekBum <alextruewestern@gmail.com>
- Via:
- Alexander Turenko <totktonada.ru@gmail.com>
- Date:
doc: update config storage doc
Update `config.storage` README to include `tarantool-ee`
changes from this PR [1].
Note that these changes are for EE only.
[1] https://github.com/tarantool/tarantool-ee/pull/857
Part of https://github.com/tarantool/tarantool-ee/issues/849
NO_DOC=doc_changes
NO_TEST=doc_changes
NO_CHANGELOG=doc_changes