Linux: Get Time in Timezone

Objective: Get the current time in a different timezone on Linux without changing the system timezone.

The easiest way to show the current time on a different timezone is to set the TZ environment variable before calling date. To show the current time in Singapore, set TZ to Asia/Singapore.

To get the list of possible values of TZ, use tzselect or timedatectl commands. tzselect is a menu driven utility to view timezones and to view timezones using timedatectl, use the list-timezones option. To list all timezones in Asia using timedatectl, use the following command syntax.

The other method is to use zdump utility to print the time in a different timezone. To get the current time in Singapore using zdump, use the following command syntax.

ibrahim = { interested_in(unix, linux, android, open_source, reverse_engineering); coding(c, shell, php, python, java, javascript, nodejs, react); plays_on(xbox, ps4); linux_desktop_user(true); }