2016-08-04 01:00:33 +00:00
|
|
|
#!/bin/bash
|
2016-08-06 00:29:06 +00:00
|
|
|
# @app pluie/alpine
|
|
|
|
# @author a-Sansara https://git.pluie.org/pluie/docker-images
|
2016-08-04 01:00:33 +00:00
|
|
|
|
|
|
|
if [ ! -z "$TZ" ] && [ -f "/usr/share/zoneinfo/$TZ" ]; then
|
|
|
|
echo "$TZ" > /etc/TZ
|
|
|
|
cp "/usr/share/zoneinfo/$TZ" "/etc/localtime"
|
|
|
|
if [ ! "${TZ///*/}" = "$TZ" ]; then
|
|
|
|
mkdir -p "/usr/share/zoneinfo/${TZ///*/}"
|
|
|
|
fi
|
|
|
|
cp /etc/localtime "/usr/share/zoneinfo/$TZ"
|
|
|
|
echo -e "\033[1;38;5;203mTIMEZONE : $TZ"
|
|
|
|
date
|
|
|
|
echo -en "\033[m"
|
2017-07-05 19:20:53 +00:00
|
|
|
apk del tzdata
|
2016-08-04 01:00:33 +00:00
|
|
|
else
|
|
|
|
echo -e "\033[1;38;5;203mNO DEFINED TIMEZONE"
|
|
|
|
fi
|