Timezones can be set by setting the TZ environment variable.
A list of all timezones supported by the OS can be found in the zoneinfo directory. This directory is located at /usr/lib/zoneinfo on many UNIX distributions. On Linux I found it to be in /usr/share/zoneinfo
“locate zoneinfo” can help determine where the zoneinfo directory is
Lets say I wish to write a script that shows me the time in Los Angeles (PDT) when my system clock is set at Mumbai (IST) and shows me the IST when system clock is set at PDT.
if [ TZ == “Asia/Kolkata” ]
>>Note that this script does not set the environment permanently….(it is a child process called by the shell…children cannot set their parents’ environment variables…they only inherit a copy of those variables.