aboutsummaryrefslogtreecommitdiffstats
path: root/tool/vcs.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tool/vcs.rb')
-rw-r--r--tool/vcs.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/tool/vcs.rb b/tool/vcs.rb
index 95cb0da7a6..7d1ecd4a88 100644
--- a/tool/vcs.rb
+++ b/tool/vcs.rb
@@ -1,6 +1,5 @@
# vcs
require 'fileutils'
-require 'time'
# This library is used by several other tools/ scripts to detect the current
# VCS in use (e.g. SVN, Git) or to interact with that VCS.
@@ -446,7 +445,9 @@ class VCS
s.sub!(/^git-svn-id: .*@(\d+) .*\n+\z/, '')
rev = $1
s.gsub!(/^ {8}/, '') if /^(?! {8}|$)/ !~ s
- date = Time.strptime(time, "%Y-%m-%d %T %z").strftime("%a, %d %b %y")
+ if /\A(\d+)-(\d+)-(\d+)/ =~ time
+ date = Time.new($1.to_i, $2.to_i, $3.to_i).strftime("%a, %d %b %Y")
+ end
w.puts "r#{rev} | #{author} | #{time} (#{date}) | #{s.count("\n")} lines\n\n"
w.puts s, sep
end