Fix generation of UTC times in spec
What does this MR do and why?
Ruby 3.0 allowed Time.utc('2022-01-02') even though it wasn't
officially documented, but Ruby 3.1+ introduces stricter checking
(https://github.com/ruby/ruby/blob/v3_1_4/NEWS.md). This commit fixes
one test that was passing in a string instead of integers.
-
Time
-
Time.new now accepts optional
in:keyword argument for the timezone, as well asTime.atandTime.now, so that is now you can omit minor arguments toTime.new. Feature 17485Time.new(2021, 12, 25, in: "+07:00") #=> 2021-12-25 00:00:00 +0700At the same time, time component strings are converted to integers more strictly now.
Time.new(2021, 12, 25, "+07:30") #=> invalid value for Integer(): "+07:30" (ArgumentError)Ruby 3.0 or earlier returned probably unexpected result
2021-12-25 07:00:00, not2021-12-25 07:30:00nor2021-12-25 00:00:00 +07:30.
-
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.