summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-18 03:07:15 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-18 03:07:15 +0000
commit36045438973153db6ddb483fbf4413da9cda90d5 (patch)
tree70a2f0e8c6fd938da9982be8e7c023d7e1be1f6f /lib
parent6baeed5b4fe22acf1761db879a1e9865cdd2d181 (diff)
merge revision(s) 63512,63514: [Backport #14790]
time.rb: fix parsing time zone in iso8601 * lib/time.rb (Time.xmlschema): a colon in time zone designator can be omitted. [ruby-core:87277] [Bug #14790] 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/branches/ruby_2_5@64431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/time.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/time.rb b/lib/time.rb
index bb5d0aac38..eb46a03ad3 100644
--- a/lib/time.rb
+++ b/lib/time.rb
@@ -575,7 +575,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