diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-12-25 18:24:39 +0900 |
---|---|---|
committer | NARUSE, Yui <naruse@airemix.jp> | 2021-12-25 18:55:32 +0900 |
commit | 80917ccbf88a938a1240848a0e1dba31d1ad1c91 (patch) | |
tree | 75f9dec21da08817a59f48490cbe0c5b48eaa9a3 /NEWS.md | |
parent | 12bbae2d4e8dc9cadeb69bf9a2459c510fa2bba5 (diff) |
NEWS: mention Time.new argument error more
Show an example of Time.new with perhaps unexpected results in
earlier versions.
(cherry picked from commit 14e550052be73ed35bfcbb0b6be696519ad7e092)
Diffstat (limited to 'NEWS.md')
-rw-r--r-- | NEWS.md | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -276,10 +276,14 @@ Note: We're only listing outstanding class updates. integers more strictly now. ```ruby - Time.new(2021, 12, 25, "+07:00") - #=> invalid value for Integer(): "+07:00" (ArgumentError) + Time.new(2021, 12, 25, "+07:30") + #=> invalid value for Integer(): "+07:30" (ArgumentError) ``` + Ruby 3.0 or earlier returned probably unexpected result + `2021-12-25 07:00:00`, not `2021-12-25 07:30:00` nor + `2021-12-25 00:00:00 +07:30`. + * Time#strftime supports RFC 3339 UTC for unknown offset local time, `-0000`, as `%-z`. [[Feature #17544]] |