diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-12-25 13:14:54 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-12-25 13:14:54 +0900 |
commit | 0abf781ab431f44c054523a3ab8f2b1c3768c898 (patch) | |
tree | aa8eb2400c589948880ae7ceece524fac28ebd08 | |
parent | 70aa7734e9c9c01b9ce3e4070a551d0334593907 (diff) |
NEWS: Mention about more strict conversions for [Feature #17485]
-rw-r--r-- | NEWS.md | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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]] |