[前][次][番号順一覧][スレッド一覧]

ruby-changes:33732

From: akr <ko1@a...>
Date: Mon, 5 May 2014 00:51:09 +0900 (JST)
Subject: [ruby-changes:33732] akr:r45813 (trunk): add comment.

akr	2014-05-05 00:51:05 +0900 (Mon, 05 May 2014)

  New Revision: 45813

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45813

  Log:
    add comment.

  Modified files:
    trunk/lib/time.rb
Index: lib/time.rb
===================================================================
--- lib/time.rb	(revision 45812)
+++ lib/time.rb	(revision 45813)
@@ -178,8 +178,12 @@ class Time https://github.com/ruby/ruby/blob/trunk/lib/time.rb#L178
       if zone_utc?(zone)
         t.utc
       elsif offset ||= zone_offset(zone)
+        # Prefer the local (real) timezone over the fixed offset (artificial)
+        # timezone.
         t.localtime
         if t.utc_offset != offset
+          # Use the fixed offset timezone only if the local timezone cannot
+          # represent the given offset.
           t.localtime(offset)
         end
       else

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]