diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-12-25 18:24:39 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-12-25 18:24:39 +0900 |
| commit | 14e550052be73ed35bfcbb0b6be696519ad7e092 (patch) | |
| tree | 95f3e37ea6398b77fbf7ab3e1b7c5786a877ea08 | |
| parent | 975a6efd7ea144275d4774d18ff0f568c1a1dc97 (diff) | |
NEWS: mention Time.new argument error more
Show an example of Time.new with perhaps unexpected results in
earlier versions.
| -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]] |
