Project

General

Profile

Actions

Bug #20797

closed

UTC offset seconds part is not checked

Added by nobu (Nobuyoshi Nakada) 17 days ago. Updated 13 days ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:119519]

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.


Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #18033: Time.new to parse a stringClosedActions
Actions #1

Updated by nobu (Nobuyoshi Nakada) 17 days ago

  • Description updated (diff)
Actions #2

Updated by nobu (Nobuyoshi Nakada) 16 days ago

  • Status changed from Open to Closed

Applied in changeset git|9611c619ac60e9aeb0341b0c8cf322a42707ce38.


[Bug #20797] Check seconds in UTC offset as well as minutes

Actions #3

Updated by nobu (Nobuyoshi Nakada) 16 days ago

  • Subject changed from UTC offset seconds is not checked to UTC offset seconds part is not checked

Updated by nagachika (Tomoyuki Chikanaga) 13 days 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.

Actions #5

Updated by Eregon (Benoit Daloze) 9 days ago

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0