Project

General

Profile

Actions

Bug #20797

closed

UTC offset seconds part is not checked

Added by nobu (Nobuyoshi Nakada) about 1 month ago. Updated 17 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) about 1 month ago

  • Description updated (diff)
Actions #2

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

Actions #3

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.

Actions #5

Updated by Eregon (Benoit Daloze) about 1 month ago

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

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0