Fixed timezone sign error
* This was introduced in recent "cosmetic" fix. Not so cosmetic after all…
This commit is contained in:
parent
86b58e83ea
commit
9b2aaf0df6
1 changed files with 6 additions and 6 deletions
|
|
@ -824,21 +824,21 @@ proc formatToken(info: TimeInfo, token: string, buf: var string) =
|
||||||
buf.add(fyear)
|
buf.add(fyear)
|
||||||
of "z":
|
of "z":
|
||||||
let hours = abs(info.timezone) div secondsInHour
|
let hours = abs(info.timezone) div secondsInHour
|
||||||
if info.timezone < 0: buf.add('-')
|
if info.timezone < 0: buf.add('+')
|
||||||
else: buf.add('+')
|
else: buf.add('-')
|
||||||
buf.add($hours)
|
buf.add($hours)
|
||||||
of "zz":
|
of "zz":
|
||||||
let hours = abs(info.timezone) div secondsInHour
|
let hours = abs(info.timezone) div secondsInHour
|
||||||
if info.timezone < 0: buf.add('-')
|
if info.timezone < 0: buf.add('+')
|
||||||
else: buf.add('+')
|
else: buf.add('-')
|
||||||
if hours < 10: buf.add('0')
|
if hours < 10: buf.add('0')
|
||||||
buf.add($hours)
|
buf.add($hours)
|
||||||
of "zzz":
|
of "zzz":
|
||||||
let
|
let
|
||||||
hours = abs(info.timezone) div secondsInHour
|
hours = abs(info.timezone) div secondsInHour
|
||||||
minutes = abs(info.timezone) mod 60
|
minutes = abs(info.timezone) mod 60
|
||||||
if info.timezone < 0: buf.add('-')
|
if info.timezone < 0: buf.add('+')
|
||||||
else: buf.add('+')
|
else: buf.add('-')
|
||||||
if hours < 10: buf.add('0')
|
if hours < 10: buf.add('0')
|
||||||
buf.add($hours)
|
buf.add($hours)
|
||||||
buf.add(':')
|
buf.add(':')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue