ruby / date

A subclass of Object includes Comparable module for handling dates.
Other
70 stars 35 forks source link

Time.strftime("%-:::z") behaves differently between 2.7/3.0 v.s. 3.1/3.2 #93

Closed dmikurube closed 1 year ago

dmikurube commented 1 year ago

(Sorry, I've reported this in https://bugs.ruby-lang.org/issues/19552, but I found ruby/date would be more appropriate.)

puts Time.now.utc.strftime("%-:::z")

Until Ruby 3.0 (tested with 2.7.7 and 3.0.5) :

+00

From Ruby 3.1 (tested with 3.1.3 and 3.2.1)

-00
nobu commented 1 year ago

This is not a method of Date.