Docker,Infrastructure

Option 1. Use the “/etc/localtime” file

Mounting the “localtime” file is the most popular way to change the timezone of containers. Here is an example.

Example: By using host server’s “/etc/localtime” file, change container’s timezone.

sudo ...

Infrastructure,Ubuntu

Check Current Timezone$ timedatectl

Example:

$ timedatectl Local time: Wed 2020-07-01 01:35:04 UTC Universal time: Wed 2020-07-01 01:35:04 UTC RTC time: Wed 2020-07-01 01:35:05 Time zone: Etc/UTC (UTC, +0000)System clock synchronized: yes NTP service: active RTC in local TZ: noChange Timezone