1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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`.
This commit is contained in:
Takashi Kokubun 2019-06-10 22:20:00 +09:00
parent caa90202c9
commit 02155da7ba
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD

View file

@ -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"