diff options
-rw-r--r-- | tool/lib/vcs.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tool/lib/vcs.rb b/tool/lib/vcs.rb index 620ac1bfeb..65eb774d38 100644 --- a/tool/lib/vcs.rb +++ b/tool/lib/vcs.rb @@ -618,9 +618,15 @@ class VCS end def format_changelog(path, arg) - cmd = %W"#{COMMAND} log --format=medium --notes=commits --date=iso-local --topo-order" + env = {'TZ' => 'JST-9', 'LANG' => 'C', 'LC_ALL' => 'C'} + cmd = %W"#{COMMAND} log --format=medium --notes=commits --topo-order" + date = "--date=iso-local" + unless system(env, *cmd, date, chdir: @srcdir, out: NullDevice, exception: false) + date = "--date=iso" + end + cmd << date cmd.concat(arg) - system({'TZ' => 'JST-9', 'LANG' => 'C', 'LC_ALL' => 'C'}, *cmd, chdir: @srcdir, out: path) + system(env, *cmd, chdir: @srcdir, out: path) end def upstream |