datetime: datetimes subtractions ignored timezone
We used to ignore timezone difference (in `tzoffset`) for datetime subtraction operation: ``` tarantool> datetime.new{tz='MSK'} - datetime.new{tz='UTC'} --- - +0 seconds ... tarantool> datetime.new{tz='MSK'}.timestamp - datetime.new{tz='UTC'}.timestamp --- - -10800 ... ``` Now we accumulate tzoffset difference in the minute component of a resultant interval: ``` tarantool> datetime.new{tz='MSK'} - datetime.new{tz='UTC'} --- - -180 minutes ... ``` Closes #7698 NO_DOC=bugfix
Showing
- changelogs/unreleased/gh-7698-datetime-subtraction-with-tz.md 28 additions, 0 deletions...gelogs/unreleased/gh-7698-datetime-subtraction-with-tz.md
- src/lib/core/datetime.c 1 addition, 0 deletionssrc/lib/core/datetime.c
- test/app-tap/datetime.test.lua 15 additions, 1 deletiontest/app-tap/datetime.test.lua
Loading