From a3f4fe3cb3c6c6d4f1d7807edb72ecb6202a929b Mon Sep 17 00:00:00 2001 From: Mika Suomalainen Date: Thu, 5 Jan 2012 15:44:14 +0200 Subject: [PATCH] update-version: Use UTC with version timestamps. If we don't use same timezone, we can get funny times, because we are on different timezones. For example, I could commit something at 16:00, then ProgVal/nyuszika7h/skizzhg/Banton could commit some- thing and timestamp would only show that it happened at the same time on different timezone. Timestamps using specific timezone could also make reading of version numbers easier. --- sandbox/update-version | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sandbox/update-version b/sandbox/update-version index 007edf77e..d8bc1b452 100755 --- a/sandbox/update-version +++ b/sandbox/update-version @@ -1,4 +1,7 @@ #!/usr/bin/env bash +export TZ="/usr/share/zoneinfo/UTC" # Use UTC with version timestamps. echo "Updating version..." perl -pi -e "s/^version\s*=\s*['\"]([\S]+)[ '\"].*/version = '\1 ($( date -Iseconds ))'/" src/version.py +unset TZ # Return to the system timezone. +exec $SHELL # Execute the current shell to return to use timezone if specified in config of shell. git add src/version.py