mirror of
https://github.com/pragma-/pbot.git
synced 2025-02-22 16:41:02 +01:00
modules/date.sh: use TZDIR
This commit is contained in:
parent
6c5d20e265
commit
ea43a3a7e4
4
modules/date.sh
vendored
4
modules/date.sh
vendored
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user