summaryrefslogtreecommitdiff
path: root/test/test_time.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-07 11:10:03 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-07 11:10:03 +0000
commitda6229a3a0a538aabcd0c209b1f751d0582d8ba3 (patch)
treee4b703337631566fdd75fbe6cee30b3bd83bd3d5 /test/test_time.rb
parent5ec7e5aae8e753e460ffbaa8f7c96e1a1c40430e (diff)
* lib/time.rb (Time.strptime): Use :offset.
Patch by Felipe Contreras. [ruby-core:57694] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_time.rb')
-rw-r--r--test/test_time.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/test_time.rb b/test/test_time.rb
index 0a4e8a7..1c95370 100644
--- a/test/test_time.rb
+++ b/test/test_time.rb
@@ -400,6 +400,8 @@ class TestTimeExtension < Test::Unit::TestCase # :nodoc:
def test_strptime
assert_equal(Time.utc(2005, 8, 28, 06, 54, 20), Time.strptime("28/Aug/2005:06:54:20 +0000", "%d/%b/%Y:%T %z"))
assert_equal(Time.at(1).localtime, Time.strptime("1", "%s"))
+ assert_equal(0, Time.strptime('0', '%s').utc_offset)
+ assert_equal(3600, Time.strptime('0 +0100', '%s %z').utc_offset)
end
def test_nsec