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:
http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/timezone.html
Works in OSX and ubuntu....
Written by Ben Kitzelman
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Tdd
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#