Project

General

Profile

Actions

Backport #4080

closed

Time#zone is always ASCII-8BIT string

Added by phasis68 (Heesob Park) over 13 years ago. Updated almost 8 years ago.

Status:
Rejected
[ruby-core:33278]

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 #1

Updated by naruse (Yui NARUSE) over 13 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r29851.
Heesob, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Actions #2

Updated by yugui (Yuki Sonoda) over 13 years ago

  • Status changed from Closed to Assigned
  • Assignee set to yugui (Yuki Sonoda)

=begin

=end

Actions #3

Updated by naruse (Yui NARUSE) almost 8 years ago

  • Status changed from Assigned to Rejected
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0