Actions
Bug #20797
closedUTC offset seconds part is not checked
Description
While this raise ArgumentError:
Time.new(2024, 12, 25, 0, 0, 0, "+09:99") # ... expected for utc_offset (ArgumentError)
This is obviously weird.
Time.new(2024, 12, 25, 0, 0, 0, "+09:00:99").strftime("%::z") #=> "+09:01:39"
The latter should be an error as well as the former.
Updated by nobu (Nobuyoshi Nakada) about 1 month ago
- Status changed from Open to Closed
Applied in changeset git|9611c619ac60e9aeb0341b0c8cf322a42707ce38.
[Bug #20797] Check seconds in UTC offset as well as minutes
Updated by nobu (Nobuyoshi Nakada) about 1 month ago
- Subject changed from UTC offset seconds is not checked to UTC offset seconds part is not checked
Updated by nagachika (Tomoyuki Chikanaga) about 1 month ago
- Backport changed from 3.1: REQUIRED, 3.2: REQUIRED, 3.3: REQUIRED to 3.1: REQUIRED, 3.2: WONTFIX, 3.3: REQUIRED
I think the issue is trivial and the making the validation more restrictive could cause errors in applications.
I decided to WONTFIX on ruby_3_2.
Updated by Eregon (Benoit Daloze) about 1 month ago
- Related to Feature #18033: Time.new to parse a string added
Updated by k0kubun (Takashi Kokubun) 17 days ago
- Backport changed from 3.1: REQUIRED, 3.2: WONTFIX, 3.3: REQUIRED to 3.1: REQUIRED, 3.2: WONTFIX, 3.3: WONTFIX
I feel the same about it. This is gonna be a WONTFIX for ruby_3_3
too.
Actions
Like0
Like0Like0Like0Like0Like0Like0