Bug #2396
closedTime.strftime returns a wrong time zone as hour offset (%z)
Description
=begin
Time.now
=> Tue Nov 24 20:47:11 +0900 2009
Time.now.strftime("%a %b %e %H:%M:%S %z %Y (%Z)")
=> Tue Nov 24 20:47:11 +0800 2009 (KST)
=end
Files
Updated by ujihisa (Tatsuhiro Ujihisa) over 14 years ago
- Status changed from Open to Assigned
- Assignee set to nobu (Nobuyoshi Nakada)
=begin
=end
Updated by chulkilee (Chulki Lee) over 14 years ago
=begin
Maybe a platform-dependent problem? (tzdata?)
Ubuntu 9.04, package ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
=> working CORRECTLY - "+0900 (KST)"
Mac OS X 10.6.2, macport ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10]
=> working INCORRECTLY - "+0800 (KST)"
Mac OS X 10.6.2, apple ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0]
=> working INCORRECTLY - "+0800 (KST)"
=end
Updated by nobu (Nobuyoshi Nakada) over 14 years ago
=begin
Seems a bug of Mac OS X's strftime().
$ uname -v
Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386
$ ./tz
tm_gmtoff = +0900, tm_zone = KST
tm_gmtoff = +0800, tm_zone = KST
Ruby 1.9 doesn't have this issue, since it uses missing/strftime.c.
=end