Skip to content

Commit

Permalink
fix(nns-tools): Use gdate command instead of date (#4008)
Browse files Browse the repository at this point in the history
Both Max and jason were unable to run the changelog-related commands
because their environment was defaulting to the macos `date` command
rather than the gnu one, which is more full-featured.

I think gdate will work for them though. It comes with coreutils which
most people should have already probably (i think you need it to compile
rust?). Also the release runscript will tell you to install coreutils if
you haven't yet.
  • Loading branch information
anchpop authored Feb 18, 2025
1 parent 37953dc commit 66eeeb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions testnet/tools/nns-tools/add-release-to-changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ else
print_red "(In particular, unable to determine which canister and commit.)" >&2
exit 1
fi
SECONDS_AGO=$(($(date +%s) - "${PROPOSED_TIMESTAMP_SECONDS}"))
SECONDS_AGO=$(($(gdate +%s) - "${PROPOSED_TIMESTAMP_SECONDS}"))
PROPOSED_ON=$(
date --utc \
gdate --utc \
--date=@"${PROPOSED_TIMESTAMP_SECONDS}" \
--iso-8601
)
Expand Down

0 comments on commit 66eeeb5

Please sign in to comment.