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:
Conversion of a time in your local time to your pre-defined time-zones – “tz ” in formats HH, HHMM or HH:MM:
Conversion of a time in a timezone from your list (Warsaw in the sample) with modified date (plus 3 days in the sample):
- Keyword: tz (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.)
- Keyword: tz [part of city name] – searches for a city in your cities that matches that name and shows the current time.
- Keyword: tz [
time] – (where
timeis HH, HHMM or HH:MM) – convert provided time into the time of your cities.
- Keyword: tz [
date modifier] [
time] – (where
timeis as above and
date modifieris ‘today’ (short: ‘t’), or ‘tomorrow’ (short: ‘tm’), or
[number of days]dwhat means to add the number of days to current date, or one of
yyyymmddto give an absolute date) – convert provided date and time into time of your cities.
- Keyword: tz [
source city] [
time] – (where
dateare as above and
source cityis 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.
- Keyword: timezone add [your city] – add your city to the list. (To remove a city, option-select it from the main list.)
- Keyword: timezone edit – open for edit of cities file.
- Keyword: timezone 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).
- Keyword: timezone 12h, timezone 24h – change format of displayed time.
- Configurable 12h/24h format. Keywords to switch “timezone 24h”, “timezone 12h”.
- Support for UTC timezone (timezone add utc)
Keyboard shortcuts to add, remove or mark as a favourite
- Install Alfred
- Purchase premium version of Alfred to enable Workflows
- Download latest ZIP file from GitHub releases page
- Unzip and double click to add to Alfred
- Project stored in GitHub https://github.com/jaroslawhartman/TimeZones-Alfred
- GeoIP2 City and Country CSV Databases: https://dev.maxmind.com/geoip/geoip2/geoip2-city-country-csv-databases/
- Flag icons from: http://www.free-country-flags.com (Creative Commons Attribution-ShareAlike 3.0 Unported License.)
- Icon design by Logo Open Stock (modified from original) http://www.logoopenstock.com
Time Zones for Alfred
32 thoughts on “Time Zones for Alfred”
Great work man! Thank you
Thanks, but in fact, all the credit needs to go to Carlos 🙂
Thanks for the workflow. Great stuff.
I’m glad you like it!
Pingback:Time Zones v1.8 in GitHub (Alfred workflow)
Since upgrading to Mac High Sierra, the extension opens a Chrome window everytime it’s called.
Would you know what the cause is?
Turned out to be an overlap with an other workflow (using ‘t’ as its keyword).
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?
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.
timezone addto add new city to the list.
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?
Ah! I’ve overlooked it. Will remove.
Raised a ticket in GitHub: https://github.com/jaroslawhartman/TimeZones-Alfred/issues/5
Thanks for reporting!
Download is a zip file that extracts to shell scripts, no .alfredworkflow in sight?
Thank you Johnathan, fixed now.
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?
Yeah, I think this is very next enhancement on my list… Registered as #6 https://github.com/jaroslawhartman/TimeZones-Alfred/issues/6
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.
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.shand remove sorting part from line 123 to be something like:
done < "$timezone_file"
I hope it will help,
Worked like a charm. Thanks so much!
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.
I must say that this issue is a big surprise to me – DST change supposed to be “automatic”.
I will be back home from my holidays on the 18th of Feb. Will take a look.
Would you be so kind and raise a new issue report on github at https://github.com/jaroslawhartman/TimeZones-Alfred/issues
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.
Good to hear it’s resolved. I hope it was something related to this old version and not a hidden bug
Best regards, Jarek
Hi, I just upgraded to Alfred 4. And I found that timezone workflow doesn’t work anymore.
Please download v2.7 from https://github.com/jaroslawhartman/TimeZones-Alfred/releases
I hope it will work better.
Thanks so much – what a great tool!
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?
Best if you go to https://github.com/jaroslawhartman/TimeZones-Alfred
How do i use this with oneupdater?
I like this, but why can’t I remove or mark as a favourite? After clicking Option + Enter or Command + Enter , it quits directly, It doesn’t work.
This has been fixed, please check the latest version.
Hi. I need this.
After I downloaded it only showed New York, London, Warsaw and New Dehli
Am I missing something? It’s like it’s a demo?
Thanks in advance