diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-31 14:06:50 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-31 14:06:50 +0000 |
commit | 53293d3c627ac25ff2978859dabeaca14a6fe7b7 (patch) | |
tree | d5fe262d73e52897882aa0e5e53f6e03eb59e106 /test | |
parent | 97a5506fd5b0559977944f6e907ae9bac3a21ca4 (diff) |
merge revision(s) 43177,43191: [Backport #8991]
* lib/time.rb (Time.strptime): Use :offset.
Patch by Felipe Contreras. [ruby-core:57694]
* lib/time.rb (Time.strptime): Time.strptime('0', '%s') returns local
time Time object as Ruby 2.0 and before.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@43483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/test_time.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/test_time.rb b/test/test_time.rb index 9dbce3f654..df6bbfd20c 100644 --- a/test/test_time.rb +++ b/test/test_time.rb @@ -393,6 +393,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(false, Time.strptime('0', '%s').utc?) + assert_equal(3600, Time.strptime('0 +0100', '%s %z').utc_offset) end def test_nsec |