aboutsummaryrefslogtreecommitdiff
path: root/src/make.bash
diff options
context:
space:
mode:
authorAlberto Donizetti <alb.donizetti@gmail.com>2017-11-02 10:22:19 +0100
committerRuss Cox <rsc@golang.org>2017-11-03 13:42:33 +0000
commit6de53832ae7678f18e1b4077134764b11687992d (patch)
tree9837857fb57bbf1c295d1f8efbe30e77a960b497 /src/make.bash
parenteaf603601bf79216772ba36a9b981f21b50ade96 (diff)
downloadgo-6de53832ae7678f18e1b4077134764b11687992d.tar.gz
go-6de53832ae7678f18e1b4077134764b11687992d.zip
cmd/dist: fix bad LC_TIME assumption in 'date' invocation
With GOBUILDTIMELOGFILE set, make.bash logs the starting time using $ echo $(date) > file and expects to be able to read the date back with time.Parse(time.UnixDate) but in some locales the default date format is not the same as time.UnixDate; for example on LC_TIME="en_GB.UTF-8" $ locale date_fmt %a %e %b %H:%M:%S %Z %Y Fix this by setting LC_TIME=C before the date command invocation. Fixes #22541 Change-Id: I59bf944bb868e2acdd816c7e35134780cdbfc6a6 Reviewed-on: https://go-review.googlesource.com/75370 Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/make.bash')
-rwxr-xr-xsrc/make.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/make.bash b/src/make.bash
index e1c3d92610..93a5c43d11 100755
--- a/src/make.bash
+++ b/src/make.bash
@@ -70,7 +70,7 @@ if [ ! -f run.bash ]; then
fi
if [ "$GOBUILDTIMELOGFILE" != "" ]; then
- echo $(date) start make.bash >"$GOBUILDTIMELOGFILE"
+ echo $(LC_TIME=C date) start make.bash >"$GOBUILDTIMELOGFILE"
fi
# Test for Windows.