Using GNU date as a world clock

The date program from coreutils can be used as a very handy world clock.

To convert a specific time to your local time zone:

$ date -d "July 23 12:00 PDT"
Mon Jul 23 21:00:00 CEST 2012
$ date -d 'TZ="US/Samoa" today 23:59'
Fri Aug 17 12:59:00 CEST 2012

To convert to a specific time zone:

$ TZ=GB date -d "12:00 CET"
Thu Aug 16 12:00:00 BST 2012
$ TZ="America/New_York" date
Thu Aug 16 05:56:49 EDT 2012

You can find the list of time zones (TZ values) by doing:

find /usr/share/zoneinfo -type f

2 thoughts on “Using GNU date as a world clock

  1. bruno

    Note that indications such “CET” and “CEST” may or may not correspond to a local time depending on daylight savings time (S = summer).

    Reply
  2. bruno Post author

    Some well-known time zone names:

    PST8PDT = Pacific Standard Time / Pacific Daylight Time
    MST7MDT = Mountain Standard Time / Mountain Daylight Time
    CST6CDT = Central Standard Time / Central Daylight Time
    EST5EDT = Eastern Standard Time / Eastern Daylight Time
    [ UTC = Coordinated Universal Time ]
    EET = Eastern European (Summer) Time
    CET (MET) = Central (Middle) European (Summer) Time
    WET = Western European (Summer) Time

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>