Skip to content

Commit

Permalink
Update datetime timezone handling after fix
Browse files Browse the repository at this point in the history
This patch fixes Tarantool output on using `datetime.new()` and
`datetime.set()` with timezones specified.

After tarantool/tarantool#10970 datetime objects created/modified with
timestamps plus timezones are handled differently from the way they are
described in the doc. Now specifying a timezone only changes the
displayed time instead of affecting the timestamp representing the time
passed from 1970-01-01. Thus, setting a new timezone properly affects
hours/minutes.

PR tarantool/tarantool#10970
Issue tarantool/tarantool#10363
  • Loading branch information
georgiy-belyanin committed Dec 24, 2024
1 parent 75205a7 commit 122bd53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/reference/reference_lua/datetime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ Functions
tz = 'Europe/Moscow'
}
---
- 2022-07-01T08:30:05.122999906 Europe/Moscow
- 2022-07-01T11:30:05.122999906 Europe/Moscow
...
tarantool> datetime.new {
Expand All @@ -230,7 +230,7 @@ Functions
tz = 'Europe/Moscow'
}
---
- 2022-07-01T08:30:05.000000123 Europe/Moscow
- 2022-07-01T11:30:05.000000123 Europe/Moscow
...
Expand Down Expand Up @@ -713,7 +713,7 @@ datetime_object
tarantool> dt:set {tzoffset = 60}
---
- 2021-08-20T18:25:20.567+0100
- 2021-08-20T16:25:20.567+0100
...
Expand Down

0 comments on commit 122bd53

Please sign in to comment.