Time Zones for Alfred

Intro

The workflow has been created by Mr Carlos from New Zealand and published on the Alfred Forum. I’ve enhanced the workflow by adding a few new functionalities:

  • Converting any time to all pre-defined time zones
  • Enabling 24-hrs time format
  • Displaying phone country code

After all it looks like below:

Preview 1

Conversion of a time in your local time to your pre-defined time-zones – “tz ” in formats HH, HHMM or HH:MM:

Preview 2

Conversion of a time in a timezone from your list (Warsaw in the sample) with modified date (plus 3 days in the sample):

Preview 3

Commands

  • Keywordtz (or hotkey) – bring up the list of saved cities with their respective current times. (Keep typing the name of a place for a one-off lookup.)
  • Keywordtz [part of city name] – searches for a city in your cities that matches that name and shows the current time.
  • Keywordtz [time] – (where time is HH, HHMM or HH:MM) – convert provided time into the time of your cities.
  • Keywordtz [date modifier] [time] – (where time is as above and date modifier is ‘today’ (short: ‘t’), or ‘tomorrow’ (short: ‘tm’), or [number of days]d what means to add the number of days to current date, or one of ddmmddyymmddyyyymmdd to give an absolute date) – convert provided date and time into time of your cities.
  • Keywordtz [source city] [date] [time] – (where time and date are as above and source city is used to search in your city list) – assumes that date and time is given in the timezone of provided source city and converts it into time of your (other) cities.
  • Keywordtimezone add [your city] – add your city to the list. (To remove a city, option-select it from the main list.)
  • Keywordtimezone edit – open for edit of cities file.
  • Keywordtimezone move – move the saved cities file (timezones.txt) to a location of your choice (so you can sync it in your Dropbox or whatever you want).
  • Keywordtimezone 12htimezone 24h – change format of displayed time.
  • Configurable 12h/24h format. Keywords to switch “timezone 24h”, “timezone 12h”.

  • Support for UTC timezone (timezone add utc)

Screenshot 2020-08-16 at 20 06 27

Screenshot 2020-08-16 at 20 33 47

Keyboard shortcuts to add, remove or mark as a favourite

  • Option + Enter – remove from the list
  • Command + Enter – pin/unpin the city from the top of the list. mymovie

Installation steps

  1. Install Alfred
  2. Purchase premium version of Alfred to enable Workflows
  3. Download latest ZIP file from GitHub releases page
  4. Unzip and double click to add to Alfred

References

Time Zones for Alfred
Tagged on:     

29 thoughts on “Time Zones for Alfred

    • 2017-05-29 at 15:12
      Permalink

      Thanks, but in fact, all the credit needs to go to Carlos 🙂

      Cheers

      Reply
  • 2018-09-11 at 13:12
    Permalink

    Thanks for the workflow. Great stuff.

    Reply
  • Pingback:Time Zones v1.8 in GitHub (Alfred workflow)

  • 2018-10-03 at 07:58
    Permalink

    Hi there

    Since upgrading to Mac High Sierra, the extension opens a Chrome window everytime it’s called.

    Would you know what the cause is?

    regards
    Johnathan

    Reply
    • 2018-10-05 at 10:52
      Permalink

      Turned out to be an overlap with an other workflow (using ‘t’ as its keyword).

      Reply
  • 2018-11-02 at 21:20
    Permalink

    Seems to not be working right. tz opens chrome and I only have 3 other workflows non of which start with “tz”

    Also: how to add default cities?

    Reply
    • 2018-11-05 at 13:18
      Permalink

      Hi Jonathan,

      Can you try disable all other workflows to see if this will help? I really don’t see any reason to open Chrome by this workflow.

      Please try timezone add to add new city to the list.

      Best regards,
      Jarek

      Reply
  • 2018-11-02 at 22:58
    Permalink

    Hi, Jarek!
    After DST change, I’ve tried to do a manual `timezone update` but it fails, and it logs the following error:
    `[2018-11-02 11:00:00][ERROR: action.script] ./update.sh: line 3: /usr/local/bin/growlnotify: No such file or directory`
    I can see that `growl` is a paid notification system. Maybe it is a good idea to remove this dependency?

    Regards,
    Serghei

    Reply
  • 2018-12-17 at 02:02
    Permalink

    Download is a zip file that extracts to shell scripts, no .alfredworkflow in sight?

    Reply
      • 2018-12-18 at 03:42
        Permalink

        Awesome. Thank you Jarek. Really good work. I use the workflow all the time!

        Jarek. I seem to remember the workflow used to support something like “tz Berlin” where Berlin isn’t in the list of shortcuts.

        So “tz” would query any city we put to it.

        Can that functionality be restored?

        Reply
  • 2019-01-18 at 23:24
    Permalink

    Hey Jarek –

    Love the workflow. Thank you for building it. I am having trouble ordering the list of cities in the ‘timezones.txt’ file using the ‘timezone edit’ command in the workflow. It will not save my changes, as I want the order of the cities to be in order from west to east.

    Thoughts?

    Reply
    • 2019-01-20 at 20:37
      Permalink

      Hi Austin,

      The script will always sort the list alphabetically, taking in account also your “favourite” cities. Here “favourite” means – pinned to the top of the list. To add or remove from fav list, press Command+Enter while on the list.

      If you really want to skip the sorting, go to timezone_list.sh and remove sorting part from line 123 to be something like:


      done < "$timezone_file"

      I hope it will help,
      Jarek

      Reply
      • 2019-01-21 at 16:30
        Permalink

        Worked like a charm. Thanks so much!

        Reply
  • 2019-02-09 at 15:26
    Permalink

    Where is this pulling the time from? It doesn’t seem to have updated to Daylight Savings time. My times are an hour off and I can’t figure out how to correct it.

    I love this app, since my daughter is overseas, but I only just realized it was using the wrong times.

    Thanks

    Reply
      • 2019-02-09 at 17:47
        Permalink

        Hi Jarek,

        I went to the latest release and reinstalled. That seems to have fixed the problem. I think it was actually an update, since some other things have changed. I’m sorry to have bothered you about it, and should have spent a little longer thinking it through.

        Enjoy your holiday. sorry for interrupting it.

        Reply
        • 2019-02-09 at 17:53
          Permalink

          Good to hear it’s resolved. I hope it was something related to this old version and not a hidden bug

          Best regards, Jarek

          Reply
  • 2019-05-30 at 10:36
    Permalink

    Hi, I just upgraded to Alfred 4. And I found that timezone workflow doesn’t work anymore.

    Reply
  • 2021-01-18 at 16:38
    Permalink

    It would be nice to give some examples to add a place in the world.
    I didn’t find anything. When you’re not a developer, how do you use it?
    Thanks

    Reply
  • 2021-07-15 at 21:57
    Permalink

    How do i use this with oneupdater?

    Reply

Leave a Reply to Alex Cancel reply

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