Last Updated: February 25, 2016
· benkitzelman

Script: Run your Tests across multiple Timezones without changing system settings

On the cmd line, set your timezone in the TZ environment variable before running your test script

TZ=Australia/Melbourne <my_test_cmd>

or this one liner to iterate over a list of time zones, executing your tests

export tzs=("Australia/Melbourne" "America/New_York" "Etc/GMT+0"); for i in "${tzs[@]}"; do TZ="$i" <my_test_cmd>; done

Timezone list:

Works in OSX and ubuntu....