mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
NEWS: mention Time.new argument error more
Show an example of Time.new with perhaps unexpected results in earlier versions.
This commit is contained in:
parent
975a6efd7e
commit
14e550052b
1 changed files with 6 additions and 2 deletions
8
NEWS.md
8
NEWS.md
|
@ -276,10 +276,14 @@ Note: We're only listing outstanding class updates.
|
||||||
integers more strictly now.
|
integers more strictly now.
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
Time.new(2021, 12, 25, "+07:00")
|
Time.new(2021, 12, 25, "+07:30")
|
||||||
#=> invalid value for Integer(): "+07:00" (ArgumentError)
|
#=> 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#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