Printing dates, or indeed executing any Unix command for a
certain timezone is easily done with setting the
For your local system, you typically set the timezone
/etc/timezone, but often it's useful to change
the timezone just for executing a command or two, such as
priting the date in a different country.
To print the date in e.g. Oslo when your local timezone is e.g. 'Asia/Taipei', do (yes on the same line, without any export or the sort):
$ TZ='Europe/Oslo' date
If you had used an export TZ there, the timezone change would
have "stuck" longer than just the
Another good usecase for setting the
is to make sure calls to the Google
Calender CLI works.