Thursday, 16 February 2012

convert time from command line without going to internet

My linux desktop is in Asia/kolkatta timezone. I used the following command to find the PST of a time in local host. Open bash and enter the following on linux
$TZ=America/Los_Angeles date -d "Thu Feb 16 11:00:00 IST 2012"
and it returns
Wed Feb 15 21:30:00 PST 2012

So with this technique you can use command line to find equivalent time of any timezone to any time zone. date command is awesome. GNU you rock.

No comments:

Post a Comment