From: Steven Baltakatei Sandoval Date: Sat, 9 Sep 2023 17:35:40 +0000 (+0000) Subject: fix(user/calcGalTick):Specify timezone as UTC X-Git-Url: https://zdv2.bktei.com/gitweb/BK-2020-03.git/commitdiff_plain/ad02ceefaf226bd3e7cf0cc03d0af21d8353016f fix(user/calcGalTick):Specify timezone as UTC --- diff --git a/user/calcGalTick.sh b/user/calcGalTick.sh index b4965dc..f692589 100644 --- a/user/calcGalTick.sh +++ b/user/calcGalTick.sh @@ -5,7 +5,7 @@ # arg2: int end index # Example: ./calcGalTick.sh 0 250 # Depends: bc 1.07.1; date (GNU coreutils) 8.32 -# Version: 0.0.1 +# Version: 0.0.2 # Ref/Attrib: [1] Galactic Tick Day Calendar. (2021-10-20). https://github.com/GalacticTick/GalacticTick.github.io/blob/master/documents/press-3.pdf # Galactic Tick duration equation (seconds) @@ -42,8 +42,8 @@ printGalTickDate() { ueTick="$( echo "$ueTickEq" | bc -l )"; # Print calendar date - #output="$(date --date="@$ueTick" +%Y-%m-%dT%H:%M:%S%z)"; - output="$(date --date="@$ueTick" +%Y-%m-%d)"; + #output="$(TZ=UTC date --date="@$ueTick" +%Y-%m-%dT%H:%M:%S%z)"; + output="$(TZ=UTC date --date="@$ueTick" +%Y-%m-%d)"; printf "%s\n" "$output"; }; # print ISO-8601 calendar date of tick