Skip to content

Commit 41890bf

Browse files
committed
rollup merge of #21274: estsauver/21270
The timezone of the server that builds rustc nightlies appears to be in UTC. From what I can tell, it builds the nightlies at 0300 UTC, which takes about ~15 minutes. So, there were a couple options here for which offset to use. UTC+3 would ensure that you always got the latest rust, but it would mean the script is broken ~15/20 minutes a day. UTC+4 means users get a stale nightly for 45 minutes, but that feels okay to me. Ideally, buildbot would publish the "current" nightly, but that seems unneeded relative to fixing it for all Timezones quickly. Fixes #21270
2 parents 89b2e23 + c034f4a commit 41890bf

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/etc/rustup.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -433,11 +433,16 @@ CFG_TMP_DIR=$(mktemp -d 2>/dev/null \
433433
|| mktemp -d -t 'rustup-tmp-install' 2>/dev/null \
434434
|| create_tmp_dir)
435435

436-
# If we're saving nightlies and we didn't specify which one, grab todays.
437-
# Otherwise we'll use the latest version.
436+
# If we're saving nightlies and we didn't specify which one, grab the latest
437+
# verison from the perspective of the server. Buildbot has typically finished
438+
# building and uploading by ~8UTC, but we want to include a little buffer.
439+
#
440+
# FIXME It would be better to use the known most recent nightly that has been
441+
# built. This is waiting on a change to have buildbot publish metadata that
442+
# can be queried.
438443
if [ -n "${CFG_SAVE}" -a -z "${CFG_DATE}" ];
439444
then
440-
CFG_DATE=`date "+%Y-%m-%d"`
445+
CFG_DATE=`TZ=Etc/UTC+9 date "+%Y-%m-%d"`
441446
fi
442447

443448
RUST_URL="https://static.rust-lang.org/dist"

0 commit comments

Comments
 (0)