Linux - Execute Your Program in a Different Timezone

in linux •  7 years ago 

It is sometimes handy to temporarily change the timezone in order to test something or run a program under a certain condition. You can do this by setting the environment variable TZ to your preferred timezone.

Example: TZ=Asia/Tokyo ./my_program

I tested this only on Ubuntu.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Congratulations @tokosh! You have received a personal award!

1 Year on Steemit
Click on the badge to view your Board of Honor.

Do you like SteemitBoard's project? Then Vote for its witness and get one more award!

Congratulations @tokosh! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!