ruby-changes:38811
From: akr <ko1@a...>
Date: Sun, 14 Jun 2015 20:11:05 +0900 (JST)
Subject: [ruby-changes:38811] akr:r50892 (trunk): * time.c (time_getlocaltime): [DOC] Add examples of valid utc_offset
akr 2015-06-14 20:10:49 +0900 (Sun, 14 Jun 2015) New Revision: 50892 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50892 Log: * time.c (time_getlocaltime): [DOC] Add examples of valid utc_offset formats. [ruby-core:68306] [Misc #10905] Patch by Charles Korn. Modified files: trunk/ChangeLog trunk/time.c Index: time.c =================================================================== --- time.c (revision 50891) +++ time.c (revision 50892) @@ -3581,6 +3581,8 @@ time_fixoff(VALUE time) https://github.com/ruby/ruby/blob/trunk/time.c#L3581 * local time (using the local time zone in effect for this process). * * If +utc_offset+ is given, it is used instead of the local time. + * +utc_offset+ can be given as a human-readable string (eg. <code>"+09:00"</code>) + * or as a number of seconds (eg. <code>32400</code>). * * t = Time.utc(2000,1,1,20,15,1) #=> 2000-01-01 20:15:01 UTC * t.utc? #=> true @@ -3592,6 +3594,10 @@ time_fixoff(VALUE time) https://github.com/ruby/ruby/blob/trunk/time.c#L3594 * j = t.getlocal("+09:00") #=> 2000-01-02 05:15:01 +0900 * j.utc? #=> false * t == j #=> true + * + * k = t.getlocal(9*60*60) #=> 2000-01-02 05:15:01 +0900 + * k.utc? #=> false + * t == k #=> true */ static VALUE Index: ChangeLog =================================================================== --- ChangeLog (revision 50891) +++ ChangeLog (revision 50892) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun Jun 14 20:09:25 2015 Tanaka Akira <akr@f...> + + * time.c (time_getlocaltime): [DOC] Add examples of valid utc_offset + formats. + [ruby-core:68306] [Misc #10905] Patch by Charles Korn. + Sun Jun 14 18:49:56 2015 Tanaka Akira <akr@f...> * ext/socket/raddrinfo.c (parse_numeric_port): Detect -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/