datetime: fix interval arithmetic for DST
We did not take into consideration the fact that as result of date/time arithmetic we could get in a different timezone, if DST boundary has been crossed during operation. ``` tarantool> datetime.new{year=2008, month=1, day=1, tz='Europe/Moscow'} + datetime.interval.new{month=6} --- - 2008-07-01T01:00:00 Europe/Moscow ... ``` Now we resolve tzoffset at the end of operation if tzindex is not 0. Fixes #7700 NO_DOC=bugfix
Showing
- changelogs/unreleased/gh-7700-interval-arithmetic-across-dst.md 19 additions, 0 deletions...logs/unreleased/gh-7700-interval-arithmetic-across-dst.md
- src/lib/core/datetime.c 17 additions, 9 deletionssrc/lib/core/datetime.c
- test/app-tap/datetime.test.lua 39 additions, 2 deletionstest/app-tap/datetime.test.lua
Loading