summaryrefslogtreecommitdiff
path: root/lib/time.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-28 15:35:08 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-28 15:35:08 +0000
commitdc2a979b7fa22f8f86c19606d5a729eb22130ba7 (patch)
treec7e518744f6d2ff761db6f57b6459bfa652c962e /lib/time.rb
parent7b4671f0300cb8d00412f46655431782d50b043a (diff)
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 'lib/time.rb')
-rw-r--r--lib/time.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/time.rb b/lib/time.rb
index d945e876ae..e227166c47 100644
--- a/lib/time.rb
+++ b/lib/time.rb
@@ -571,7 +571,7 @@ class Time
T
(\d\d):(\d\d):(\d\d)
(\.\d+)?
- (Z|[+-]\d\d:?\d\d)?
+ (Z|[+-]\d\d(?::?\d\d)?)?
\s*\z/ix =~ date
year = $1.to_i
mon = $2.to_i