• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tarantool / tarantool / 39492802827
88%

Build:
DEFAULT BRANCH: master
Ran 20 Oct 2026 08:46PM UTC
Jobs 1
Files 528
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Oct 2026 08:32PM UTC coverage: 87.99% (-0.002%) from 87.992%
39492802827

push

github

georgiy-belyanin
datetime: add new behavior for setting timezones

This patch adds a fix making `datetime` handle `tz` and `tzoffset`
parameters properly.

Previously, changing a timezone altered the timestamp value but
preserved the time of day. Now you may enable new behavior making
specifying a timezone preserve the timestamp and update the represented
time of day.

This behavior could be achieved by setting a new compat option
`datetime_apply_timezone_action` to `'new'`. The option is going to be
enabled by default in 4.x.

Enabling new behavior involves the following.
1. Creating a datetime object with non-empty `tz`/`tzoffset` and
   `timestamp` values results with a time of day corresponding to
   the timestamp value plus the timezone offset. E.g if we create a
   datetime object with a timestamp corresponding to 9:12 o'clock in
   `+0000` timezone and set `tzoffset = -60` the resulting timestamp
   will represent 8:12 o'clock.
2. Setting a new `tz`/`tzoffset` affects the time of day represented by
   the datetime. E.g. if you update a datetime object of 11:12 o'clock
   having `tzoffset = 180` with `tzoffset = 120` the resulting datetime
   object will represent 10:12.
3. Creating a datetime object with only a timezone preserves the zero
   timestamp, so `datetime.new{tz = x}` stays equivalent to
   `datetime.new{}:set{tz = x}`.

The new behavior only affects applying a timezone provided alone or
together with a timestamp. Time units (year/month/day, hour/min/sec,
nsec/usec/msec) provided together with a timezone are still applied to
the wall clock time within this timezone.

Closes #10363

NO_DOC=will be in tarantool/doc#4720

72624 of 121589 branches covered (59.73%)

1 of 1 new or added line in 1 file covered. (100.0%)

26 existing lines in 11 files now uncovered.

109009 of 123888 relevant lines covered (87.99%)

1409702.76 hits per line

Coverage Regressions

Lines Coverage ∆ File
6
92.53
-0.27% src/box/vinyl.c
4
93.62
-2.13% src/box/vy_range.c
3
90.95
-0.25% src/box/memtx_engine.cc
2
91.14
-0.06% src/box/box.cc
2
87.82
-0.41% src/box/vy_stmt.c
2
89.74
-0.09% src/box/xrow.c
2
93.61
-0.21% src/box/xrow_update_field.c
2
80.95
-9.52% src/lib/core/tt_sigaction.c
1
98.08
-0.31% src/lib/json/json.c
1
97.29
0.1% src/lib/msgpuck/msgpuck.h
1
85.15
-0.99% src/lib/small/small/slab_arena.c
Jobs
ID Job ID Ran Files Coverage
1 39492802827.1 20 Oct 2026 08:46PM UTC 528
87.99
GitHub Action Run
Source Files on build 39492802827
  • Tree
  • List 528
  • Changed 27
  • Source Changed 0
  • Coverage Changed 27
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 36f5233a on github
  • Prev Build on master (#39492570869)
  • Next Build on master (#39594830693)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc