summaryrefslogtreecommitdiff
path: root/ext/psych/lib/psych/scalar_scanner.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/psych/lib/psych/scalar_scanner.rb')
-rw-r--r--ext/psych/lib/psych/scalar_scanner.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/psych/lib/psych/scalar_scanner.rb b/ext/psych/lib/psych/scalar_scanner.rb
index e2aef65bda..dc6f9944fa 100644
--- a/ext/psych/lib/psych/scalar_scanner.rb
+++ b/ext/psych/lib/psych/scalar_scanner.rb
@@ -90,7 +90,7 @@ module Psych
return time if 'Z' == md[3]
return Time.at(time.to_i, us) unless md[3]
- tz = md[3].split(':').map { |digit| Integer(digit.sub(/([-+])0/, '\1')) }
+ tz = md[3].split(':').map { |digit| Integer(digit, 10) }
offset = tz.first * 3600 + ((tz[1] || 0) * 60)
Time.at((time - offset).to_i, us)
end