Dual-Life / Time-Piece

Object Oriented time objects
Other
15 stars 33 forks source link

fix strftime('%z%Z') of gmtime #3

Closed dayflower closed 9 years ago

dayflower commented 10 years ago

In my environment, localtime->strftime('%z %Z') returns +0900 JST, it's OK.

But gmtime->strftime('%z %Z') also returns +0900 JST, it seems fault. The right result would be +0000 UTC (or GMT, strftime(3) on Linux represents GMT for gmtime).

rjbs commented 10 years ago

This would also address https://rt.cpan.org/Ticket/Display.html?id=75046

tsibley commented 10 years ago

and also address https://rt.cpan.org/Ticket/Modify.html?id=93095, I believe.

smith153 commented 9 years ago

Merged. I spent several days attempting to unify this issue at the xs level, but to no avail. The native strftime gives different results on windows and mac os and that is just the 'way it is'. Using a string substitute before passing to native strftime is about the only way to make this (%z and %Z) behave the same everywhere.