New implementations of times.parse & times.format (#8094)
This commit is contained in:
parent
c6671776a1
commit
3b310e91cd
4 changed files with 975 additions and 619 deletions
|
|
@ -36,8 +36,8 @@ let utcPlus2 = Timezone(zoneInfoFromUtc: staticZoneInfoFromUtc, zoneInfoFromTz:
|
|||
block timezoneTests:
|
||||
let dt = initDateTime(01, mJan, 2017, 12, 00, 00, utcPlus2)
|
||||
doAssert $dt == "2017-01-01T12:00:00+02:00"
|
||||
doAssert $dt.utc == "2017-01-01T10:00:00+00:00"
|
||||
doAssert $dt.utc == "2017-01-01T10:00:00Z"
|
||||
doAssert $dt.utc.inZone(utcPlus2) == $dt
|
||||
|
||||
doAssert $initDateTime(01, mJan, 1911, 12, 00, 00, utc()) == "1911-01-01T12:00:00+00:00"
|
||||
doAssert $initDateTime(01, mJan, 0023, 12, 00, 00, utc()) == "0023-01-01T12:00:00+00:00"
|
||||
doAssert $initDateTime(01, mJan, 1911, 12, 00, 00, utc()) == "1911-01-01T12:00:00Z"
|
||||
doAssert $initDateTime(01, mJan, 0023, 12, 00, 00, utc()) == "0023-01-01T12:00:00Z"
|
||||
Loading…
Add table
Add a link
Reference in a new issue