Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby 3.1: Add specs for Time#strftime supporting RFC 3339 UTC for unknown offset local time #959

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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