mirror of
https://github.com/pragma-/pbot.git
synced 2025-02-23 00:50:49 +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
|
#!/bin/bash
|
||||||
|
|
||||||
|
export LC_TIME=C
|
||||||
export TZ=UTC
|
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 '$*'."
|
echo "No match for '$*'."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user