Merge pull request #5614 from moigagoo/fix_time_offset_in_times_js
Times: JS: Remove implicit UTC convesion.
This commit is contained in:
commit
6edd100619
2 changed files with 266 additions and 260 deletions
|
|
@ -11,3 +11,16 @@ import times
|
|||
block yeardayTest:
|
||||
# check if yearday attribute is properly set on TimeInfo creation
|
||||
doAssert fromSeconds(2147483647).getGMTime().yearday == 18
|
||||
|
||||
block localTimezoneTest:
|
||||
# check if timezone is properly set during Time to TimeInfo conversion
|
||||
doAssert fromSeconds(2147483647).getLocalTime().timezone == getTimezone()
|
||||
|
||||
block timestampPersistenceTest:
|
||||
# check if timestamp persists during TimeInfo to Time conversion
|
||||
const
|
||||
timeString = "2017-03-21T12:34:56+03:00"
|
||||
timeStringGmt = "2017-03-21T09:34:56+00:00"
|
||||
fmt = "yyyy-MM-dd'T'HH:mm:sszzz"
|
||||
|
||||
doAssert $timeString.parse(fmt).toTime().getGMTime() == timeStringGmt
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue