Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know about http://www.timeanddate.com/worldclock/converter.html

I can't figure out how to query http://www.google.com in a sane natural format like "5pm BST in PST".

Or do I have to write such an app?

share|improve this question
    
What do you mean exactly? Command line linux? Command you can type into Google? What?! – Dal Hundal Jul 16 '10 at 9:37
    
command line in shell and google's query box are both a command line to me – hendry Jul 16 '10 at 9:42
1  
perhaps a better tool would do cities by airport codes, 5pm LHR in SFO – hendry Jul 16 '10 at 9:42
up vote 19 down vote accepted

It's 6pm in Taipei, what time is it here?

date --date='TZ="Asia/Taipei" 18:00'
Fri Jul 16 11:00:00 BST 2010

At 11am here in London, what time is it in Taipei?

TZ=Asia/Taipei date -d "11:00 BST"
Fri Jul 16 18:00:00 CST 2010
share|improve this answer

This example is from http://www.pixelbeat.org/cmdline.html#dates

It gives the local time corresponding to 9AM on the west coast of the US, accounting for differing day light savings transitions.

date --date='TZ="America/Los_Angeles" 09:00 next Fri'

Use tzselect to get the TZ. The PST format is ambiguous. IST = Indian Standard Time and Irish Summer Time for example.

share|improve this answer
1  
Didn't know about tzselect, thanks. If you enter wrong 'TZ' input you can get misleading results, e.g. TZ=London date Fri Jul 16 10:28:52 London 2010 – hendry Jul 16 '10 at 10:29

I think this is closer to what the OP asked (Since he doesn't necessarily know that BST is Taipei? and the answer doesn't explain how to get to "Asia/Taipei" from 'BST').

First my current date:

$ date
Mon Apr 21 13:07:21 MDT 2014

Then the date I want to know:

$ date -d '5pm BST'
Mon Apr 21 15:00:00 MDT 2014

So I know that 5pm BST is 2 hours away.

I usually forget if I have to add or remove two hours from EDT times so I have a little script with the common timezones I have to work with:

$ cat tz
#!/bin/bash
TZ='America/Edmonton' date
TZ='America/Chicago' date
TZ='America/New_York' date

And the output:

$ tz
Mon Apr 21 13:12:32 MDT 2014
Mon Apr 21 14:12:32 CDT 2014
Mon Apr 21 15:12:32 EDT 2014

Valid locations for your tz script can be found here /usr/share/zoneinfo.

But again, for times in the future I just use date -d '<time> <timezone>'.

share|improve this answer

Use Wolfram Alpha. To the basic URL…

http://www.wolframalpha.com/input/?i=

append the conversion, with spaces replaced by +. For example:

http://www.wolframalpha.com/input/?i=5+PM+CET+to+PST

Note that Wolfram Alpha does not seem to recognize BST as a time zone.

share|improve this answer
    
how does one quickly look up time zone codes? – hendry Jul 16 '10 at 10:31
    
@hendry This is a cool interactive online map: timeanddate.com/time/map/#!cities=241 – DavidG Apr 21 '14 at 19:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .