-
Notifications
You must be signed in to change notification settings - Fork 43
Document timezone support #2886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Merged
Merged
ligurio
added a commit
that referenced
this issue
Aug 12, 2024
ligurio
added a commit
that referenced
this issue
Aug 12, 2024
ligurio
added a commit
that referenced
this issue
Aug 12, 2024
ligurio
added a commit
that referenced
this issue
Aug 13, 2024
Closes #2886 Co-authored-by: Andrey Aksenov <[email protected]>
ligurio
added a commit
that referenced
this issue
Aug 13, 2024
Closes #2886 Co-authored-by: Andrey Aksenov <[email protected]>
ligurio
added a commit
that referenced
this issue
Aug 13, 2024
Closes #2886 Co-authored-by: Andrey Aksenov <[email protected]>
ligurio
added a commit
that referenced
this issue
Aug 13, 2024
Closes #2886 Co-authored-by: Andrey Aksenov <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Product: Tarantool
Since:
Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/
SME: @ ligurio
Related to #2574
Details
Timezones support
Tarantool uses IANA tzdata aka Olson DB facilities for timezone
resolution at the moment of parsing of datetime literals or while
parsing
tz
attribute in constructor, or:set{}
method call.In addition to the
tzoffset
we provided before, we now definetzindex
, the unique index assigned by Tarantool to each known IANAtimezone.
Now
date.isdst
field (alone and as part of:totable()
table) iscorrectly calculated using
tzindex
and attributes of the selectedtimezone in the Olson DB timezone.
All timezone names and abbreviations, known to the current Tarantool
version are available via
datetime.TZ
bidirectional array.Limitations
There were moments in past history, when local mean time in some
partcular zone used timezone offset not representable in whole
minutes, but rather in seconds, i.e. in Moscow before 1918 there
used to be offset +2 hours 31 minutes and 19 seconds. Please see
Olson dump for this period
Modern tzdata rules do not use such tiny fraction, and all timezones differ
to UTC in units measured in minutes, not seconds. Tarantool datetime uses
minutes internally as units for
tzoffset
so there is some loss ofprecision if you try to operate with such ancient timestamps.
Requested by @ tsafin in tarantool/tarantool@979a8fb.
The text was updated successfully, but these errors were encountered: