[RFC PATCH 0/1] adding user.hideTimezone for setting UTC timezone
- From
- Shengfa Lin <shengfa@google.com>
- Date
- Sep 30, 2020, 23:21 UTC
- Message-ID
- <20200930232138.3656304-1-shengfa@google.com>
- In-Reply-To
- <CAEOYnAQYMrNAe9s1V-0DVLdL-B_KpHMDP5e=yRnbCkMWdrvFHQ@mail.gmail.com>
Discussed with Jonathan and Junio regarding whether we should support letting user specify timezone or restricted to UTC only. There was no defnite conclusion. I think it's a good idea to start with this implementation which might result in the change landing or e.g. a documentation change.
The patch add checking for user.hideTimezone and change environment variable TZ to UTC in the beginning of cmd_commit if it's true. As a result, when calculating timezone offset in datestamp(date.c) would result in 0.
Shengfa Lin (1): hideTimezone: add a user.hideTimezone config
Documentation/config/user.txt | 4 ++++ builtin/commit.c | 5 +++++ t/t7527-commit-hide-timezone.sh | 37 +++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100755 t/t7527-commit-hide-timezone.sh
-- 2.28.0.709.gb0816b6eb0-goog