Bug #20797
closed
UTC offset seconds part is not checked
Added by nobu (Nobuyoshi Nakada) 17 days ago.
Updated 13 days ago.
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.
- Description updated (diff)
- Status changed from Open to Closed
- Subject changed from UTC offset seconds is not checked to UTC offset seconds part is not checked
- 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.
Also available in: Atom
PDF
Like0
Like0Like0Like0Like0Like0