diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-05-28 15:35:08 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-05-28 15:35:08 +0000 |
commit | dc2a979b7fa22f8f86c19606d5a729eb22130ba7 (patch) | |
tree | c7e518744f6d2ff761db6f57b6459bfa652c962e /test | |
parent | 7b4671f0300cb8d00412f46655431782d50b043a (diff) | |
download | ruby-dc2a979b7fa22f8f86c19606d5a729eb22130ba7.tar.gz |
time.rb: fix parsing time zone in iso8601
* lib/time.rb (Time.xmlschema): the minute in time zone designator
can be omitted together with the preceding colon.
[ruby-core:87277] [Bug #14790]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-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 d01d74eb52..26a7daaf2a 100644 --- a/test/test_time.rb +++ b/test/test_time.rb @@ -106,6 +106,7 @@ class TestTimeExtension < Test::Unit::TestCase # :nodoc: s = "1996-12-19T16:39:57-08:00" assert_equal(t, Time.__send__(method, s)) assert_equal(t, Time.__send__(method, s.sub(/:(?=00\z)/, ''))) + assert_equal(t, Time.__send__(method, s.sub(/:00\z/, ''))) # There is no way to generate time string with arbitrary timezone. s = "1996-12-20T00:39:57Z" assert_equal(t, Time.__send__(method, s)) |