Skip to content

Commit

Permalink
Migrate daily builds to UTC (#1417)
Browse files Browse the repository at this point in the history
Temporary patch to keep the build names predictable. Ideally we wouldn't
need to specify the exact date of the build, but for now this patch
should at least keep it protected from daylight savings timezones
  • Loading branch information
singiamtel authored Oct 28, 2024
1 parent f81b07b commit c5d3b65
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions daily-tags.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ substitute_vars () {
value=${value//!!FLPSUITE_LATEST!!/$flpsuite_latest}
value=${value//!!FLPSUITE_CURRENT!!/$flpsuite_current}
value=${value//!!ALIDIST_BRANCH!!/$ALIDIST_BRANCH}
LANG=C TZ=Europe/Zurich date -d "@$START_TIMESTAMP" "+$value"
LANG=C TZ=UTC date -d "@$START_TIMESTAMP" "+$value"
}

edit_package_tag () {
Expand Down Expand Up @@ -157,7 +157,8 @@ EOF
)

# Finally, replace strftime formatting (%Y, %m, %d etc) in the pattern.
AUTOTAG_TAG=$(LANG=C TZ=Europe/Zurich date -d "@$START_TIMESTAMP" "+$AUTOTAG_PATTERN")
# We use the UTC timezone to avoid issues with DST changes.
AUTOTAG_TAG=$(LANG=C TZ=UTC date -d "@$START_TIMESTAMP" "+$AUTOTAG_PATTERN")

: "${AUTOTAG_TAG:?}" # make sure the tag isn't empty
[ "$TEST_TAG" = true ] && AUTOTAG_TAG=TEST-IGNORE-$AUTOTAG_TAG
Expand Down

0 comments on commit c5d3b65

Please sign in to comment.