#!/usr/bin/with-contenv bash

if [[ -n "$TZ" ]]; then
    if [[ -f "/usr/share/zoneinfo/$TZ" ]]; then
         ln -sf /usr/share/zoneinfo/$TZ /etc/localtime
         echo "$TZ" >  /etc/timezone
    else
        echo "WARNING: $TZ is not a valid time zone."
    fi
fi
