ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:109233] [Ruby master Bug#18922] Time at 24:00:00 UTC is not normalized since 3.1
@ 2022-07-17 13:41 nobu (Nobuyoshi Nakada)
  2022-07-17 15:08 ` [ruby-core:109234] [Ruby master Bug#18922] Time at 24:00:00 UTC is not normalized nobu (Nobuyoshi Nakada)
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: nobu (Nobuyoshi Nakada) @ 2022-07-17 13:41 UTC (permalink / raw)
  To: ruby-core

Issue #18922 has been reported by nobu (Nobuyoshi Nakada).

----------------------------------------
Bug #18922: Time at 24:00:00 UTC is not normalized since 3.1
https://bugs.ruby-lang.org/issues/18922

* Author: nobu (Nobuyoshi Nakada)
* Status: Open
* Priority: Normal
* Backport: 2.7: DONTNEED, 3.0: DONTNEED, 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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:109234] [Ruby master Bug#18922] Time at 24:00:00 UTC is not normalized
  2022-07-17 13:41 [ruby-core:109233] [Ruby master Bug#18922] Time at 24:00:00 UTC is not normalized since 3.1 nobu (Nobuyoshi Nakada)
@ 2022-07-17 15:08 ` nobu (Nobuyoshi Nakada)
  2022-07-18 12:18 ` [ruby-core:109237] " mame (Yusuke Endoh)
  2022-09-25  4:44 ` [ruby-core:110059] " nagachika (Tomoyuki Chikanaga)
  2 siblings, 0 replies; 4+ messages in thread
From: nobu (Nobuyoshi Nakada) @ 2022-07-17 15:08 UTC (permalink / raw)
  To: ruby-core

Issue #18922 has been updated by nobu (Nobuyoshi Nakada).

Backport changed from 2.7: DONTNEED, 3.0: DONTNEED, 3.1: REQUIRED to 2.7: REQUIRED, 3.0: DONTNEED, 3.1: REQUIRED
Subject changed from Time at 24:00:00 UTC is not normalized since 3.1 to Time at 24:00:00 UTC is not normalized

`Time.new(2000, 1, 1, 24, 0, 0, "Z").to_a[0, 6]` returns `[0, 0, 24, 1, 1, 2000]` since 2.7.
It seems to be a much older bug, just that `"Z"` was not supported 2.6 and earlier and didn’t appear.

----------------------------------------
Bug #18922: Time at 24:00:00 UTC is not normalized
https://bugs.ruby-lang.org/issues/18922#change-98368

* Author: nobu (Nobuyoshi Nakada)
* Status: Open
* Priority: Normal
* Backport: 2.7: REQUIRED, 3.0: DONTNEED, 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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:109237] [Ruby master Bug#18922] Time at 24:00:00 UTC is not normalized
  2022-07-17 13:41 [ruby-core:109233] [Ruby master Bug#18922] Time at 24:00:00 UTC is not normalized since 3.1 nobu (Nobuyoshi Nakada)
  2022-07-17 15:08 ` [ruby-core:109234] [Ruby master Bug#18922] Time at 24:00:00 UTC is not normalized nobu (Nobuyoshi Nakada)
@ 2022-07-18 12:18 ` mame (Yusuke Endoh)
  2022-09-25  4:44 ` [ruby-core:110059] " nagachika (Tomoyuki Chikanaga)
  2 siblings, 0 replies; 4+ messages in thread
From: mame (Yusuke Endoh) @ 2022-07-18 12:18 UTC (permalink / raw)
  To: ruby-core

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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:110059] [Ruby master Bug#18922] Time at 24:00:00 UTC is not normalized
  2022-07-17 13:41 [ruby-core:109233] [Ruby master Bug#18922] Time at 24:00:00 UTC is not normalized since 3.1 nobu (Nobuyoshi Nakada)
  2022-07-17 15:08 ` [ruby-core:109234] [Ruby master Bug#18922] Time at 24:00:00 UTC is not normalized nobu (Nobuyoshi Nakada)
  2022-07-18 12:18 ` [ruby-core:109237] " mame (Yusuke Endoh)
@ 2022-09-25  4:44 ` nagachika (Tomoyuki Chikanaga)
  2 siblings, 0 replies; 4+ messages in thread
From: nagachika (Tomoyuki Chikanaga) @ 2022-09-25  4:44 UTC (permalink / raw)
  To: ruby-core

Issue #18922 has been updated by nagachika (Tomoyuki Chikanaga).

Backport changed from 2.7: REQUIRED, 3.0: REQUIRED, 3.1: REQUIRED to 2.7: REQUIRED, 3.0: REQUIRED, 3.1: DONE

ruby_3_1 13ee4b2c35bad0f893d5ed5a6fdca62da406f958 merged revision(s) 68903df6f6fc548f3bf68fb09ee8b2495dcd28f0.

----------------------------------------
Bug #18922: Time at 24:00:00 UTC is not normalized
https://bugs.ruby-lang.org/issues/18922#change-99310

* Author: nobu (Nobuyoshi Nakada)
* Status: Closed
* Priority: Normal
* Backport: 2.7: REQUIRED, 3.0: REQUIRED, 3.1: DONE
----------------------------------------
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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-09-25  4:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-17 13:41 [ruby-core:109233] [Ruby master Bug#18922] Time at 24:00:00 UTC is not normalized since 3.1 nobu (Nobuyoshi Nakada)
2022-07-17 15:08 ` [ruby-core:109234] [Ruby master Bug#18922] Time at 24:00:00 UTC is not normalized nobu (Nobuyoshi Nakada)
2022-07-18 12:18 ` [ruby-core:109237] " mame (Yusuke Endoh)
2022-09-25  4:44 ` [ruby-core:110059] " nagachika (Tomoyuki Chikanaga)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).