[ruby-core:111570] [Ruby master Bug#19295] Time#wday returns 7

Issue #19295 has been reported by akostadinov (Aleksandar Kostadinov). ---------------------------------------- Bug #19295: Time#wday returns 7 https://bugs.ruby-lang.org/issues/19295 * Author: akostadinov (Aleksandar Kostadinov) * Status: Open * Priority: Normal * ruby -v: ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [x86_64-linux] * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- This issue happens since Ruby 2.7, since `Z` and `UTC` are allowed for a zone. ``` ruby [1] pry(main)> Time.new(2023, 1,3,0,0,0,"UTC").wday => 7 [2] pry(main)> Time.new(2023, 1,3,0,0,0,"Z").wday => 7 ``` This also breaks all weekday `Time#monday?`, etc. methods. -- https://bugs.ruby-lang.org/

Issue #19295 has been updated by nobu (Nobuyoshi Nakada). Status changed from Open to Closed Seems same as #19291. ---------------------------------------- Bug #19295: Time#wday returns 7 https://bugs.ruby-lang.org/issues/19295#change-100941 * Author: akostadinov (Aleksandar Kostadinov) * Status: Closed * Priority: Normal * ruby -v: ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [x86_64-linux] * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- This issue happens since Ruby 2.7, since `Z` and `UTC` are allowed for a zone. ``` ruby [1] pry(main)> Time.new(2023, 1,3,0,0,0,"UTC").wday => 7 [2] pry(main)> Time.new(2023, 1,3,0,0,0,"Z").wday => 7 ``` This also breaks all weekday `Time#monday?`, etc. methods. -- https://bugs.ruby-lang.org/

Issue #19295 has been updated by akostadinov (Aleksandar Kostadinov). nobu (Nobuyoshi Nakada) wrote in #note-2:
Seems same as #19292.
In #19292 it is said that 3.0 and 2.7 don't need while they do. ---------------------------------------- Bug #19295: Time#wday returns 7 https://bugs.ruby-lang.org/issues/19295#change-100942 * Author: akostadinov (Aleksandar Kostadinov) * Status: Closed * Priority: Normal * ruby -v: ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [x86_64-linux] * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- This issue happens since Ruby 2.7, since `Z` and `UTC` are allowed for a zone. ``` ruby [1] pry(main)> Time.new(2023, 1,3,0,0,0,"UTC").wday => 7 [2] pry(main)> Time.new(2023, 1,3,0,0,0,"Z").wday => 7 ``` This also breaks all weekday `Time#monday?`, etc. methods. -- https://bugs.ruby-lang.org/

Issue #19295 has been updated by nobu (Nobuyoshi Nakada). Backport changed from 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN to 2.7: REQUIRED, 3.0: REQUIRED, 3.1: REQUIRED, 3.2: REQUIRED The patch conflicted with 2.7, but could fix this issue by applying with preceding patches. ---------------------------------------- Bug #19295: Time#wday returns 7 https://bugs.ruby-lang.org/issues/19295#change-100961 * Author: akostadinov (Aleksandar Kostadinov) * Status: Closed * Priority: Normal * ruby -v: ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [x86_64-linux] * Backport: 2.7: REQUIRED, 3.0: REQUIRED, 3.1: REQUIRED, 3.2: REQUIRED ---------------------------------------- This issue happens since Ruby 2.7, since `Z` and `UTC` are allowed for a zone. ``` ruby [1] pry(main)> Time.new(2023, 1,3,0,0,0,"UTC").wday => 7 [2] pry(main)> Time.new(2023, 1,3,0,0,0,"Z").wday => 7 ``` This also breaks all weekday `Time#monday?`, etc. methods. -- https://bugs.ruby-lang.org/
participants (2)
-
akostadinov (Aleksandar Kostadinov)
-
nobu (Nobuyoshi Nakada)