aboutsummaryrefslogtreecommitdiffstats
path: root/tool/vcs.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tool/vcs.rb')
-rw-r--r--tool/vcs.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/tool/vcs.rb b/tool/vcs.rb
index 0866131926..8b99533c61 100644
--- a/tool/vcs.rb
+++ b/tool/vcs.rb
@@ -93,8 +93,9 @@ class VCS
if modified
/\A(\d+)-(\d+)-(\d+)\D(\d+):(\d+):(\d+(?:\.\d+)?)\s*(?:Z|([-+]\d\d)(\d\d))\z/ =~ modified or
raise "unknown time format - #{modified}"
+ match = $~[1..6].map { |x| x.to_i }
begin
- modified = Time.new(*$~[1..6].map(&:to_i), ($7 ? "#{$7}:#{$8}" : "+00:00"))
+ modified = Time.new(*match, ($7 ? "#{$7}:#{$8}" : "+00:00"))
rescue ArgumentError
modified = Time.utc(*$~[1..6]) + $7.to_i * 3600 + $8.to_i * 60
end