summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2019-06-10 22:20:00 +0900
committerTakashi Kokubun <takashikkbn@gmail.com>2019-06-10 22:35:32 +0900
commit02155da7bad37bd1c8adadd486d2d16eac7af43b (patch)
treebbd42699b63ee42402de32438fbe816032cd7610
parentcaa90202c9d2acbb9bce32ceebe6166c2f1de5d0 (diff)
Make file2lastrev timezone consistent with git log
Using the same timezone for all commits is convenient when just looking dates in RUBY_DESCRIPTION, but usually we also check `git log` when we're interested in the order of commits. `git log` shows times in committer's timezone and forcing RUBY_RELEASE_DATE to JST makes it harder to find a corresponding commit from `git log`. Because this label is only used in development, I believe there's no strict requirement to use traditional timezone for release here. Also when building Ruby after committing from a non-JST timezone, I'd be surprised to see a strange time (in a different timezone) for my very new commit in `ruby -v`.
-rwxr-xr-xtool/file2lastrev.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/tool/file2lastrev.rb b/tool/file2lastrev.rb
index f7df07e330..c5d4c95f9b 100755
--- a/tool/file2lastrev.rb
+++ b/tool/file2lastrev.rb
@@ -11,8 +11,6 @@ require File.expand_path('../vcs', __FILE__)
Program = $0
-TIMEZONE_FOR_RELEASE = "+09:00" # in Japan Standard Time traditionally
-
@output = nil
def self.output=(output)
if @output and @output != output
@@ -77,8 +75,7 @@ vcs = nil
"#define RUBY_LAST_COMMIT_TITLE #{title.dump}"
end,
if modified
- modified.getlocal(TIMEZONE_FOR_RELEASE).
- strftime(<<TIME)
+ modified.strftime(<<TIME)
#if defined(RUBY_PATCHLEVEL) && (RUBY_PATCHLEVEL == -1)
#undef RUBY_RELEASE_DATE
#define RUBY_RELEASE_DATE "%FT%T%:z"