diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-03 11:31:33 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-03 11:31:33 +0000 |
commit | 4de238663a6e6d6b4f5306bb5f88a9e067c4f4c0 (patch) | |
tree | 42e904483f055e1ce400b26d8a26fe2111183274 /test/test_time.rb | |
parent | 38656e24bea4a6ced1ebc18a0178bf8c1b175ca7 (diff) | |
download | ruby-4de238663a6e6d6b4f5306bb5f88a9e067c4f4c0.tar.gz |
* lib/time.rb (Time.strptime): Use d[:offset] if d[:seconds] is not
given.
Reported by tadayoshi funaba. [ruby-core:62322]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_time.rb')
-rw-r--r-- | test/test_time.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/test_time.rb b/test/test_time.rb index 582e60b8ae..0496af855e 100644 --- a/test/test_time.rb +++ b/test/test_time.rb @@ -402,6 +402,7 @@ class TestTimeExtension < Test::Unit::TestCase # :nodoc: assert_equal(Time.at(1).localtime, Time.strptime("1", "%s")) assert_equal(false, Time.strptime('0', '%s').utc?) assert_equal(3600, Time.strptime('0 +0100', '%s %z').utc_offset) + assert_equal(-7200, Time.strptime('20010203 -0200', '%Y%m%d %z').utc_offset) end def test_nsec |