Tests: Times: JS: Add test for timestamp persistence.
This commit is contained in:
parent
cc9d282348
commit
35cdb42e02
1 changed files with 9 additions and 1 deletions
|
|
@ -12,6 +12,14 @@ block yeardayTest:
|
||||||
# check if yearday attribute is properly set on TimeInfo creation
|
# check if yearday attribute is properly set on TimeInfo creation
|
||||||
doAssert fromSeconds(2147483647).getGMTime().yearday == 18
|
doAssert fromSeconds(2147483647).getGMTime().yearday == 18
|
||||||
|
|
||||||
block timezoneTest:
|
block localTimezoneTest:
|
||||||
# check if timezone is properly set durint Time to TimeInfo conversion
|
# check if timezone is properly set durint Time to TimeInfo conversion
|
||||||
doAssert fromSeconds(2147483647).getLocalTime().timezone == getTimezone()
|
doAssert fromSeconds(2147483647).getLocalTime().timezone == getTimezone()
|
||||||
|
|
||||||
|
block timestampPersistenceTest:
|
||||||
|
# check if timestamp persists during TimeInfo to Time conversion
|
||||||
|
const
|
||||||
|
testString = "2017-03-21T12:34:56+04:00"
|
||||||
|
fmt = "yyyy-MM-dd'T'HH:mm:sszzz"
|
||||||
|
|
||||||
|
doAssert $testString.parse(fmt) == testString
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue