From: "zverok (Victor Shepelev)" Date: 2022-11-01T15:58:48+00:00 Subject: [ruby-core:110571] [Ruby master Misc#19096] [Question] Time with `-00:00` offset is in UTC Issue #19096 has been updated by zverok (Victor Shepelev). On my computer (GMT+2, Europe/Kyiv timezone), the same behavior is reproducing since 3.1 (and on the current head). ```ruby [Time.new(2022, 1, 1, 0, 0, 0, "+00:00").utc?, Time.new(2022, 1, 1, 0, 0, 0, "-00:00").utc?] # => [false, true] ``` Before that (2.7 and 3.0), both are `false`. I'll try to debug it later this week if nobody else does. ---------------------------------------- Misc #19096: [Question] Time with `-00:00` offset is in UTC https://bugs.ruby-lang.org/issues/19096#change-99901 * Author: andrykonchin (Andrew Konchin) * Status: Open * Priority: Normal ---------------------------------------- It's a bit unexpected but ```ruby Time.new(2022, 1, 1, 0, 0, 0, "-00:00").utc? # => true ``` But time with `+00:00` or `0` offset is treated as not UTC time: ```ruby Time.new(2022, 1, 1, 0, 0, 0, "+00:00").utc? # => false Time.new(2022, 1, 1, 0, 0, 0, 0).utc? # => false ``` Is it an intentional behaviour? In this case could you please clarify the reason why it works this way? -- https://bugs.ruby-lang.org/ Unsubscribe: