1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

NEWS: Mention about more strict conversions for [Feature #17485]

This commit is contained in:
Nobuyoshi Nakada 2021-12-25 13:14:54 +09:00
parent 70aa7734e9
commit 0abf781ab4
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

13
NEWS.md
View file

@ -267,6 +267,19 @@ Note: We're only listing outstanding class updates.
timezone, as well as `Time.at` and `Time.now`, so that is now
you can omit minor arguments to `Time.new`. [[Feature #17485]]
```ruby
Time.new(2021, 12, 25, in: "+07:00")
#=> 2021-12-25 00:00:00 +0700
```
At the same time, time component strings are converted to
integers more strictly now.
```ruby
Time.new(2021, 12, 25, "+07:00")
#=> invalid value for Integer(): "+07:00" (ArgumentError)
```
* Time#strftime supports RFC 3339 UTC for unknown offset local
time, `-0000`, as `%-z`. [[Feature #17544]]