ruby-changes:70574
From: Nobuyoshi <ko1@a...>
Date: Sat, 25 Dec 2021 14:16:08 +0900 (JST)
Subject: [ruby-changes:70574] 0abf781ab4 (master): NEWS: Mention about more strict conversions for [Feature #17485]
https://git.ruby-lang.org/ruby.git/commit/?id=0abf781ab4 From 0abf781ab431f44c054523a3ab8f2b1c3768c898 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sat, 25 Dec 2021 13:14:54 +0900 Subject: NEWS: Mention about more strict conversions for [Feature #17485] --- NEWS.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/NEWS.md b/NEWS.md index 43bc9decc7f..25378824759 100644 --- a/NEWS.md +++ b/NEWS.md @@ -267,6 +267,19 @@ Note: We're only listing outstanding class updates. https://github.com/ruby/ruby/blob/trunk/NEWS.md#L267 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]] -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/