Skip to content

Commit b9a213f

Browse files
committed
Fix timezone of yesterday
Set the `TZ environment variable. `git log` does not recognize UTC offset in `--before` option, unless full datetime is given.
1 parent d4e1f9e commit b9a213f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

template/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,4 +748,4 @@ yes-test-syntax-suggest: $(PREPARE_SYNTAX_SUGGEST)
748748
no-test-syntax-suggest:
749749

750750
yesterday:
751-
$(GIT_IN_SRC) reset --hard `$(GIT_LOG_FORMAT):%H -1 --before=00:00+0900`
751+
$(GIT_IN_SRC) reset --hard `TZ=UTC-9 $(GIT_LOG_FORMAT):%H -1 --before=00:00`

win32/Makefile.sub

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1391,6 +1391,7 @@ rubyspec-capiext: $(RUBYSPEC_CAPIEXT_EXTS)
13911391
exts: rubyspec-capiext
13921392

13931393
yesterday:
1394+
(set TZ=UTC-9) && \
13941395
for /f "usebackq" %H in \
1395-
(`$(GIT_LOG_FORMAT):%H -1 "--before=00:00+0900"`) do \
1396+
(`$(GIT_LOG_FORMAT):%H -1 "--before=00:00"`) do \
13961397
$(GIT_IN_SRC) reset --hard %%H

0 commit comments

Comments
 (0)