datetime: make date.new{} and date:set{} equivalent
Constructor date.new() and modifier date:set() should always produce same result for all attributes combinations. Fixed the problem for `timestamp` with `tzoffset`. Fixes #6793 @TarantoolBot document Title: datetime :set{} with tzoffset Constructor `date.new()` and modifier `date:set()` should always produce same result for all attributes combinations. Fixed the problem for `timestamp` with `tzoffset`. ``` tarantool> date.new{tzoffset = '+0800', timestamp = 1630359071} --- - 2021-08-30T21:31:11+0800 ... tarantool> date.new():set{tzoffset = '+0800', timestamp = 1630359071} --- - 2021-08-30T21:31:11+0800 ... ```
Showing
- changelogs/unreleased/gh-6793-datetime-set-with-tzoffset.md 5 additions, 0 deletionschangelogs/unreleased/gh-6793-datetime-set-with-tzoffset.md
- src/lua/datetime.lua 38 additions, 24 deletionssrc/lua/datetime.lua
- test/app-tap/datetime.test.lua 43 additions, 9 deletionstest/app-tap/datetime.test.lua
Loading