ruby-changes:60213
From: =E0=A4=AA=E0=A5=8D=E0=A4=B0=E0=A4=A5=E0=A4=AE=E0=A5=87=E0=A4=B6 <ko1@a...>
Date: Thu, 27 Feb 2020 11:09:04 +0900 (JST)
Subject: [ruby-changes:60213] 9a422fc010 (master): Update docs for Time#at method [ci skip]
https://git.ruby-lang.org/ruby.git/commit/?id=9a422fc010 From 9a422fc010ab150438ef9dd66fd4c717f03927d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=AA=E0=A5=8D=E0=A4=B0=E0=A4=A5=E0=A4=AE=E0=A5=87?= =?UTF-8?q?=E0=A4=B6=20Sonpatki?= <csonpatki@g...> Date: Thu, 27 Feb 2020 07:38:49 +0530 Subject: Update docs for Time#at method [ci skip] Add docs about all possible options for the `in` argument. diff --git a/time.c b/time.c index 2b5d451..e5e71e5 100644 --- a/time.c +++ b/time.c @@ -2806,10 +2806,12 @@ get_scale(VALUE unit) https://github.com/ruby/ruby/blob/trunk/time.c#L2806 * +seconds+ and +microseconds_with_frac+ since the Epoch. * +seconds_with_frac+ and +microseconds_with_frac+ * can be an Integer, Float, Rational, or other Numeric. - * non-portable feature allows the offset to be negative on some systems. + * A non-portable feature allows the offset to be negative on some systems. * * If +in+ argument is given, the result is in that timezone or UTC offset, or * if a numeric argument is given, the result is in local time. + * The +in+ argument accepts timezones in +HH:MM or -HH:MM format along with + * accepting military timezones and UTC. * * Time.at(0) #=> 1969-12-31 18:00:00 -0600 * Time.at(Time.at(0)) #=> 1969-12-31 18:00:00 -0600 @@ -2818,6 +2820,9 @@ get_scale(VALUE unit) https://github.com/ruby/ruby/blob/trunk/time.c#L2820 * Time.at(946684800.2).usec #=> 200000 * Time.at(946684800, 123456.789).nsec #=> 123456789 * Time.at(946684800, 123456789, :nsec).nsec #=> 123456789 + * Time.at(1582721899, in: "+09:00") #=> 2020-02-26 21:58:19 +0900 + * Time.at(1582721899, in: "UTC") #=> 2020-02-26 12:58:19 UTC + * Time.at(1582721899, in: "C") #=> 2020-02-26 13:58:19 +0300 */ static VALUE -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/