Skip to content

Commit

Permalink
Add specs for Time#strftime supporting RFC 3339 UTC for unknown offse…
Browse files Browse the repository at this point in the history
…t local time
  • Loading branch information
ytjmt authored and eregon committed Oct 15, 2022
1 parent 96fa596 commit b8004d0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/time/strftime_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,13 @@
time = @new_time_with_offset[2012, 1, 1, 0, 0, 0, Rational(36645, 10)]
time.strftime("%::z").should == "+01:01:05"
end

ruby_version_is "3.1" do
it "supports RFC 3339 UTC for unknown offset local time, -0000, as %-z" do
@time.strftime("%z").should == "+0000"
@time.strftime("%-z").should == "-0000"
@time.strftime("%-:z").should == "-00:00"
@time.strftime("%-::z").should == "-00:00:00"
end
end
end

0 comments on commit b8004d0

Please sign in to comment.