[前][次][番号順一覧][スレッド一覧]

ruby-changes:56070

From: Takashi <ko1@a...>
Date: Mon, 10 Jun 2019 22:39:08 +0900 (JST)
Subject: [ruby-changes:56070] Takashi Kokubun: 02155da7ba (trunk): Make file2lastrev timezone consistent with git log

https://git.ruby-lang.org/ruby.git/commit/?id=02155da7ba

From 02155da7bad37bd1c8adadd486d2d16eac7af43b Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Mon, 10 Jun 2019 22:20:00 +0900
Subject: 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`.

diff --git a/tool/file2lastrev.rb b/tool/file2lastrev.rb
index f7df07e..c5d4c95 100755
--- a/tool/file2lastrev.rb
+++ b/tool/file2lastrev.rb
@@ -11,8 +11,6 @@ require File.expand_path('../vcs', __FILE__) https://github.com/ruby/ruby/blob/trunk/tool/file2lastrev.rb#L11
 
 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 https://github.com/ruby/ruby/blob/trunk/tool/file2lastrev.rb#L75
           "#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"
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]