Permalink
Browse files

timezone independent test_time

  • Loading branch information...
1 parent 1e22036 commit 88991082b34ca56597d8edce9713f2d0f60cee1e @timfel timfel committed Aug 17, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/test/test_time.rb
View
@@ -1,8 +1,8 @@
require File.expand_path('simple', File.dirname(__FILE__))
-t = Time.at(1222895022) # Wed Oct 01 14:03:42 -0700 2008
-t2 = Time.at(1222895022)
-later = Time.at(1222895023)
+t = Time.local(2008, 10, 01, 14, 03, 42) # Wed Oct 01 14:03:42 -0700 2008
+t2 = Time.local(2008, 10, 01, 14, 03, 42)
+later = Time.local(2008, 10, 01, 14, 03, 43)
test(t.year, 2008, "year()")
test(t.day, 1, "day()")
@@ -40,7 +40,7 @@
test(t.strftime("%w"), "3", "%w test")
test(t.strftime("%y"), "08", "%y test")
test(t.strftime("%Y"), "2008", "%Y test")
-test(t.strftime("%Z"), "PDT", "%Z test")
+# test(t.strftime("%Z"), "PDT", "%Z test")
test(t.strftime("%%"), "%", "%% test")
# %x returns 2008 on Linux, 08 on Solaris
# test(t.strftime("%x"), "10/01/08", "%x test")

0 comments on commit 8899108

Please sign in to comment.