about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEarl St Sauver <estsauver@gmail.com>2015-01-16 16:54:11 -0800
committerEarl St Sauver <estsauver@gmail.com>2015-01-18 18:06:15 -0800
commitc034f4a44a4b3d69f4f7f2efeecb5f9742ec0d24 (patch)
tree9c383008b3a94a18ae13f70bb6abf73ce3ff590a /src
parent653e6880c96f858ff1d9a42b525bf3a903ae94c8 (diff)
downloadrust-c034f4a44a4b3d69f4f7f2efeecb5f9742ec0d24.tar.gz
rust-c034f4a44a4b3d69f4f7f2efeecb5f9742ec0d24.zip
Make date of nightly in rustup match server TZ
Diffstat (limited to 'src')
-rwxr-xr-xsrc/etc/rustup.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/etc/rustup.sh b/src/etc/rustup.sh
index 749d9eaa173..476d19d0b45 100755
--- a/src/etc/rustup.sh
+++ b/src/etc/rustup.sh
@@ -433,11 +433,16 @@ CFG_TMP_DIR=$(mktemp -d 2>/dev/null \
            || mktemp -d -t 'rustup-tmp-install' 2>/dev/null \
            || create_tmp_dir)
 
-# If we're saving nightlies and we didn't specify which one, grab todays.
-# Otherwise we'll use the latest version.
+# If we're saving nightlies and we didn't specify which one, grab the latest
+# verison from the perspective of the server. Buildbot has typically finished
+# building and uploading by ~8UTC, but we want to include a little buffer.
+#
+# FIXME It would be better to use the known most recent nightly that has been
+# built. This is waiting on a change to have buildbot publish metadata that
+# can be queried.
 if [ -n "${CFG_SAVE}" -a -z "${CFG_DATE}" ];
 then
-    CFG_DATE=`date "+%Y-%m-%d"`
+    CFG_DATE=`TZ=Etc/UTC+9 date "+%Y-%m-%d"`
 fi
 
 RUST_URL="https://static.rust-lang.org/dist"