TZ environment variable, it is easy to do this using plain old date (I am using 7.4 from GNU coreutils).For example, what time is it right now in India?
$ TZ=Asia/Calcutta date
Sat Jul 4 00:40:41 IST 2009
I want to hold a meeting at 9am, what time will it be in India?
$ TZ=Asia/Calcutta date -d '9am EDT'
Sat Jul 4 18:30:00 IST 2009
There's a meeting on Friday at 4pm in India, what time will it be here?
$ date -d 'Fri 4pm IST'
Fri Jul 3 06:30:00 EDT 2009
For extra goodness, if you use zsh, do
TZ=[TAB] and the shell will complete available timezones for you.
No comments:
Post a Comment