summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-12-25 18:24:39 +0900
committerNARUSE, Yui <naruse@airemix.jp>2021-12-25 18:55:32 +0900
commit80917ccbf88a938a1240848a0e1dba31d1ad1c91 (patch)
tree75f9dec21da08817a59f48490cbe0c5b48eaa9a3
parent12bbae2d4e8dc9cadeb69bf9a2459c510fa2bba5 (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)
-rw-r--r--NEWS.md8
1 files changed, 6 insertions, 2 deletions
diff --git a/NEWS.md b/NEWS.md
index 39b34f4009..edea4b560f 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -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]]