Closed dmikurube closed 9 months ago
They may be ultimate cases, so may not be to fix. But reporting just in case.
require 'date' puts DateTime._strptime("UTC+99:13", "%z") puts DateTime._strptime("UTC+99:13:14", "%z") puts DateTime._strptime("UTC+912:42", "%z") puts DateTime._strptime("UTC+912:42:49", "%z") puts DateTime._strptime("UTC-99:13", "%z") puts DateTime._strptime("UTC-99:13:14", "%z") puts DateTime._strptime("UTC-912:42", "%z") puts DateTime._strptime("UTC-912:42:49", "%z")
Until Ruby 3.1 (tested with 2.7.7, 3.0.5, 3.1.3)
{:zone=>"UTC+99:13", :offset=>357180} {:zone=>"UTC+99:13:14", :offset=>357194} {:zone=>"UTC+912:42", :offset=>3285720} {:zone=>"UTC+912:42:49", :offset=>3285769} {:zone=>"UTC-99:13", :offset=>-357180} {:zone=>"UTC-99:13:14", :offset=>-357194} {:zone=>"UTC-912:42", :offset=>-3285720} {:zone=>"UTC-912:42:49", :offset=>-3285769}
From Ruby 3.2 (tested with Ruby 3.2.1)
{:zone=>"UTC+99:13", :offset=>nil} {:zone=>"UTC+99:13:14", :offset=>nil} {:zone=>"UTC+912:42", :offset=>nil} {:zone=>"UTC+912:42:49", :offset=>nil} {:zone=>"UTC-99:13", :offset=>nil} {:zone=>"UTC-99:13:14", :offset=>nil} {:zone=>"UTC-912:42", :offset=>nil} {:zone=>"UTC-912:42:49", :offset=>nil}
+99 is out of range of hour.
They may be ultimate cases, so may not be to fix. But reporting just in case.
Until Ruby 3.1 (tested with 2.7.7, 3.0.5, 3.1.3)
From Ruby 3.2 (tested with Ruby 3.2.1)