From ea43a3a7e43a471a2814f8eb017ccfa70ee1f806 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sun, 7 Feb 2021 14:05:21 -0800 Subject: [PATCH] modules/date.sh: use TZDIR --- modules/date.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/date.sh b/modules/date.sh index 31f3782d..ed81c902 100755 --- a/modules/date.sh +++ b/modules/date.sh @@ -1,7 +1,9 @@ #!/bin/bash +export LC_TIME=C export TZ=UTC -if (( $# )) && ! read -r TZ < <(IFS=_; find -L /usr/share/zoneinfo/posix -type f -not -iname 'West' -iname "*$**" -printf '%P\n' -quit); then +TZDIR=${TZDIR:-/usr/share/zoneinfo/posix} +if (( $# )) && ! read -r TZ < <(IFS=_; find -L "$TZDIR" -type f -not -iname 'West' -iname "*$**" -printf '%P\n' -quit); then echo "No match for '$*'." exit 1 fi