Issue #6491 has been updated by kenips (Ken Ip).


@tadf why is this closed? To me a discrepancy between DateTime.strftime and Time.strftime should either be documented or fixed. You're saying that:

> DateTime.now.strftime('%z %Z')
=> "-0400 -04:00"

> Time.now.strftime('%z %Z')
=> "-0400 EDT"

is OK?
----------------------------------------
Bug #6491: DateTime.strftime('%Z') output is incorrect format
https://bugs.ruby-lang.org/issues/6491#change-40515

Author: zombor (Jeremy Bush)
Status: Rejected
Priority: Low
Assignee: tadf (tadayoshi funaba)
Category: 
Target version: 
ruby -v: ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11]
Backport: 


DateTime.parse('2012/05/23').strftime('%Z') should output 'GMT' (or a similar string). It outputs "+00:00" (or a similar offset string).


-- 
http://bugs.ruby-lang.org/