Actions
Backport #4080
closedTime#zone is always ASCII-8BIT string
Status:
Rejected
Assignee:
Description
=begin
Time#zone returns ASCII-8BIT string.
On the other hand, Time#strftime('%Z') returns correct encoded string.
I think Time#zone's encoding should be same to Time#strftime('%Z').
C:\work>irb
irb(main):001:0> t = Time.now
=> 2010-11-22 11:39:06 +0900
irb(main):002:0> t.zone
=> "\xB4\xEB\xC7\xD1\xB9\xCE\xB1\xB9 \xC7\xA5\xC1\xD8\xBD\xC3"
irb(main):003:0> t.zone.encoding
=> #Encoding:ASCII-8BIT
irb(main):004:0> t.strftime('%Z')
=> "대한민국 표준시"
irb(main):005:0> t.strftime('%Z').encoding
=> #Encoding:CP949
irb(main):006:0> t.zone == t.strftime('%Z')
=> false
=end
Actions
Like0
Like0Like0Like0