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

ruby-changes:56071

From: Takashi <ko1@a...>
Date: Mon, 10 Jun 2019 23:31:37 +0900 (JST)
Subject: [ruby-changes:56071] Takashi Kokubun: f0bfa71ab3 (trunk): Use UTC for file2lastrev timezone

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

From f0bfa71ab3ce5f6045a39e503f6decbc9b3a7d3d Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Mon, 10 Jun 2019 23:23:15 +0900
Subject: Use UTC for file2lastrev timezone

02155da7bad37bd1c8adadd486d2d16eac7af43b got a claim about sacrificing
ability to compare arbitrary `RUBY_DESCRIPTION`s without converting
timezones.

Because most of the people would be familiar with timezone conversion
with UTC but it'd be harder when it comes to JST, this commit just
changes the timezone in f42588f754d5885ec30631e5008c383f3ef905d8 to UTC.

Another bonus in using UTC is that we can use a shorter variant of
ISO 8601 format like "2019-06-10T14:26:24Z" (the last Z part).

diff --git a/tool/file2lastrev.rb b/tool/file2lastrev.rb
index c5d4c95..090f2e9 100755
--- a/tool/file2lastrev.rb
+++ b/tool/file2lastrev.rb
@@ -75,10 +75,10 @@ vcs = nil https://github.com/ruby/ruby/blob/trunk/tool/file2lastrev.rb#L75
           "#define RUBY_LAST_COMMIT_TITLE #{title.dump}"
         end,
         if modified
-          modified.strftime(<<TIME)
+          modified.utc.strftime(<<TIME)
 #if defined(RUBY_PATCHLEVEL) && (RUBY_PATCHLEVEL == -1)
 #undef RUBY_RELEASE_DATE
-#define RUBY_RELEASE_DATE "%FT%T%:z"
+#define RUBY_RELEASE_DATE "%FT%TZ"
 #endif
 TIME
         end,
-- 
cgit v0.10.2


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

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