None-alpine:
echo <TIMEZONE> > /etc/timezone && ln -sf /usr/share/zoneinfo/<TIMEZONE> /etc/localtime && dpkg-reconfigure -f noninteractive tzdata
// Before
Current default time zone: 'Etc/UTC'
Local time is now: Mon May 11 08:21:58 UTC 2020.
Universal Time is now: Mon May 11 08:21:58 UTC 2020.
// After
Current default time zone: 'Asia/Jakarta'
Local time is now: Mon May 11 15:33:00 WIB 2020.
Universal Time is now: Mon May 11 08:33:00 UTC 2020.
Alpine:
cp /usr/share/zoneinfo/<TIMEZONE> /etc/localtime && echo "<TIMEZONE>" > etc/timezone
apk --no-cache update && \
apk --no-cache upgrade && \
apk --no-cache add tzdata openntpd
// Before
bash-5.0# date
Mon May 11 15:41:57 WIB 2020
// After
bash-5.0# date
Mon May 11 08:42:45 UTC 2020