Jarek Hartman
Wednesday, December 14, 2016

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:

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):

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

  1. Project stored in GitHub https://github.com/jaroslawhartman/TimeZones-Alfred
  2. GeoIP2 City and Country CSV Databases: https://dev.maxmind.com/geoip/geoip2/geoip2-city-country-csv-databases/
  3. Flag icons from: http://www.free-country-flags.com (Creative Commons Attribution-ShareAlike 3.0 Unported License.)
  4. Icon design by Logo Open Stock (modified from original) http://www.logoopenstock.com

Support

Your support on Buy Me a Coffee is invaluable, motivating me to continue crafting bytes that matters – thank you sincerely!