From: "mame (Yusuke Endoh)" Date: 2022-07-18T12:18:59+00:00 Subject: [ruby-core:109237] [Ruby master Bug#18922] Time at 24:00:00 UTC is not normalized Issue #18922 has been updated by mame (Yusuke Endoh). As a record: the behavior I found was about Time#inspect, which was clearly wrong. ``` $ ruby -ve 'p Time.new(2000, 1, 1, 24, 0, 0, "Z")' ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux] 2000-01-01 23:00:00 UTC ``` After nobu's patch, it works correctly. ``` $ ./miniruby -ve 'p Time.new(2000, 1, 1, 24, 0, 0, "Z")' ruby 3.2.0dev (2022-07-18T10:07:55Z master a74634de10) [x86_64-linux] 2000-01-02 00:00:00 UTC ``` ---------------------------------------- Bug #18922: Time at 24:00:00 UTC is not normalized https://bugs.ruby-lang.org/issues/18922#change-98371 * Author: nobu (Nobuyoshi Nakada) * Status: Closed * Priority: Normal * Backport: 2.7: REQUIRED, 3.0: REQUIRED, 3.1: REQUIRED ---------------------------------------- Reported by @mame. ```shell-session $ ruby3.0 -e 'p Time.new(2000, 1, 1, 24, 0, 0, "-00:00").to_a[0, 6]' [0, 0, 0, 2, 1, 2000] ``` ```shell-session $ ruby3.1 -e 'p Time.new(2000, 1, 1, 24, 0, 0, "-00:00").to_a[0, 6]' [0, 0, 24, 1, 1, 2000] ``` ```shell-session $ ruby3.2 -e 'p Time.new(2000, 1, 1, 24, 0, 0, "-00:00").to_a[0, 6]' [0, 0, 24, 1, 1, 2000] ``` -- https://bugs.ruby-lang.org/ Unsubscribe: