summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-09 15:07:45 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-09 15:07:45 +0000
commit8b73cefeda2181b64695ac14eb12f0d62a3f667d (patch)
tree5ad3212ec2ac5bb58ec0b12999a5cade38b512ce /test
parent9eecfd5c2f051088c1d6267deb1dfac172458a7f (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_2_0_0@43221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-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 0a4e8a70c3..582e60b8ae 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(false, Time.strptime('0', '%s').utc?)
+ assert_equal(3600, Time.strptime('0 +0100', '%s %z').utc_offset)
end
def test_nsec