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:
parent
70aa7734e9
commit
0abf781ab4
1 changed files with 13 additions and 0 deletions
13
NEWS.md
13
NEWS.md
|
@ -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
|
timezone, as well as `Time.at` and `Time.now`, so that is now
|
||||||
you can omit minor arguments to `Time.new`. [[Feature #17485]]
|
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#strftime supports RFC 3339 UTC for unknown offset local
|
||||||
time, `-0000`, as `%-z`. [[Feature #17544]]
|
time, `-0000`, as `%-z`. [[Feature #17544]]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue