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

ruby-changes:45421

From: nobu <ko1@a...>
Date: Thu, 2 Feb 2017 07:18:33 +0900 (JST)
Subject: [ruby-changes:45421] nobu:r57494 (trunk): test_time.rb: use UTC

nobu	2017-02-02 07:18:28 +0900 (Thu, 02 Feb 2017)

  New Revision: 57494

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57494

  Log:
    test_time.rb: use UTC
    
    * test/ruby/test_time.rb (test_strftime_no_hidden_garbage): fix
      failure due to timezone offset.

  Modified files:
    trunk/test/ruby/test_time.rb
Index: test/ruby/test_time.rb
===================================================================
--- test/ruby/test_time.rb	(revision 57493)
+++ test/ruby/test_time.rb	(revision 57494)
@@ -1092,7 +1092,7 @@ class TestTime < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_time.rb#L1092
 
   def test_strftime_no_hidden_garbage
     fmt = %w(Y m d).map { |x| "%#{x}" }.join('-') # defeats optimization
-    t = Time.at(0)
+    t = Time.at(0).getutc
     ObjectSpace.count_objects(res = {}) # creates strings on first call
     before = ObjectSpace.count_objects(res)[:T_STRING]
     val = t.strftime(fmt)

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

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