Jump to content

TimeZones - a World Clock script filter [updated to v1.7]


Recommended Posts

Thanks very much for creating this workflow. Just one problem: it stopped working today because my time zone changed (due to Daylight savings). The workflow seems to get confused by this change. How do I fix this?

 

When you say "stopped working", you mean it gives the wrong times now?

 

You should be able to run "timezone update" and it will acquire new offsets for all your stored places. Let me know how that goes.

Link to comment

When you say "stopped working", you mean it gives the wrong times now?

 

You should be able to run "timezone update" and it will acquire new offsets for all your stored places. Let me know how that goes.

 

Thanks, this solved the problem!

 

EDIT: The only problem with this solution is that it requires me to keep up with the rest of the world to know when other countries are implementing Daylight savings time. Otherwise, I have to run the timezone update every single time before checking the time in a different country.

Edited by parekh
Link to comment

Thanks, this solved the problem!

 

EDIT: The only problem with this solution is that it requires me to keep up with the rest of the world to know when other countries are implementing Daylight savings time. Otherwise, I have to run the timezone update every single time before checking the time in a different country.

Yeah, I mentioned that in my initial post. That's the price of instant access. The reason why the workflow runs so fast is that all the time offsets are stored on your computer. If it was to check online for every place every time, then it would take several seconds at least to generate the main list.

 

Realistically, daylight saving changes are fairly predictable. AFAIK they all happen overnight between Sat-Sun, and it's around this time of year. So really, all you'd need to do is run "timezone update" once every Sunday for March & April, and again in Sept/Oct. And remember, you can always get the exact current time in any place by entering "tz name of place".

 

One way I could improve this is to store the date of the next daylight savings change for each city and then check that when showing the main list and updating if that date is passed. However, I don't know of a decent online source that can provide this information in an easy-to-parse format (ie. an API). If you know of such a thing, then I'd be happy to implement it. :)

Link to comment

Yeah, I mentioned that in my initial post. That's the price of instant access. The reason why the workflow runs so fast is that all the time offsets are stored on your computer. If it was to check online for every place every time, then it would take several seconds at least to generate the main list.

 

Thanks for your detailed response. Is there any way for me to modify this workflow such that it checks online for every place every time? I don't mind that it would take several seconds longer.

 

Also, thanks for creating this great workflow. The best solution to this problem would be if countries all over the world decided to abandon the silly concept of daylight savings!

Edited by parekh
Link to comment

Thanks for your detailed response. Is there any way for me to modify this workflow such that it checks online for every place every time? I don't mind that it would take several seconds longer.

Sorry, not at this stage as that would require a substantially different approach. I'll look in to the daylight savings thing for a future update.

 

EDIT: Actually, here's what you could do, although IMHO it's probably more trouble than it's worth. If you don't mind the waiting time, then you're effectively saying you'll wait the time it takes to do the "timezone update" process every time. So, in that case, change the "timezone update" keyword to something a little more convenient, then add this line to the bottom of the "Run Script" action that runs after the update:

osascript -e 'tell application "Alfred 2" to search "tz"'

What that now means is that you'll perform a full update in the background, then the Alfred window will load with the current times.

Does that make sense? Let me know if you'd like me to break it down further.

Edited by CarlosNZ
Link to comment

This is awesome! The only thing I miss is the ability to reorder cities on my list.

Yeah, a lot of workflow developers been asking for more control over the results order, so I figure this will be possible in a future Alfred update.

Link to comment
  • 2 weeks later...
  • 3 weeks later...

Hi there. I just installed the workflow - thank you for it, it looks great. However, unfortunately the flags are not showing up for me... Any idea why this could be? It just displays the timer icon next to each city, even after several minutes.... 

 

Thanks for your help. 

Link to comment

Thanks for this - it's a great workflow. I don't know if this has already been asked, but is possible to change the UTC offset to a local offset (i.e. my tz +/-)? That's the only thing that is still making me hold on to World Clock Deluxe.

 

Thanks

Link to comment

Hi there. I just installed the workflow - thank you for it, it looks great. However, unfortunately the flags are not showing up for me... Any idea why this could be? It just displays the timer icon next to each city, even after several minutes.... 

 

Thanks for your help. 

Hmm, don't know why that would be the case. Can you confirm that the flag files are present in the workflow folder? Do you have your workflows stored in a non-standard location, perhaps?

Link to comment

Thanks for this - it's a great workflow. I don't know if this has already been asked, but is possible to change the UTC offset to a local offset (i.e. my tz +/-)? That's the only thing that is still making me hold on to World Clock Deluxe.

 

Thanks

Just to clarify - do you mean an offset to the local time, so that the displayed list shows the time as it was/will be a specified number of hours ago/away?

 

At this stage, no, sorry. I might be able to add this for a future update. How would you imagine it would work? Is it something you'd want to adjust regularly and quickly?

Link to comment

Hi CarlosNZ,

 

What I mean is the time difference (might be a better word) from my timezone to other international cities. The UTC difference isn't really useful to me. At the moment (using World Clock Deluxe) I have a list of cities displaying their local times and the time difference from my location. For example, I'm in Melbourne, - Manchester UK displays their local time [-9:00], Singapore ...[-2:00], etc. Anyway, it's a quick easy way for me to see the time difference. It's not a big deal and the workflow is fantastic in any case, but I just thought I'd ask.

 

Thanks

Link to comment

Hi CarlosNZ,

 

What I mean is the time difference (might be a better word) from my timezone to other international cities. The UTC difference isn't really useful to me. At the moment (using World Clock Deluxe) I have a list of cities displaying their local times and the time difference from my location. For example, I'm in Melbourne, - Manchester UK displays their local time [-9:00], Singapore ...[-2:00], etc. Anyway, it's a quick easy way for me to see the time difference. It's not a big deal and the workflow is fantastic in any case, but I just thought I'd ask.

 

Thanks

Okay, I see what you mean. Should be fairly easy to implement. I'll bear it in mind next time I update this.

 

Cheers.

Link to comment

Hmm, don't know why that would be the case. Can you confirm that the flag files are present in the workflow folder? Do you have your workflows stored in a non-standard location, perhaps?

 

No, they're in the usual place. Unfortunately I don't currently have access to my Macbook (I will on Monday), so I can't check - but I had literally just installed Alfred 2, so I can't see why the flag files wouldn't be present in the workflow folder, if they're put there upon installation of the workflow... Still, I can check next week. But they're definitely not appearing. 

Link to comment
  • 2 months later...

I am not able to add city to the database. I tried to type "tz add Tampa" and it correctly retrieves the time there but pressing "Return" only show the Large Type text, not adding the city. Please help :(

Hi there, the default keyword for adding a new location is "timezone add", not "tz add". So, try "timezone add Tampa". (Or you can just start typing "timezone", then select "New City" from the results list when it appears.)

Link to comment
  • 1 month later...
  • 5 months later...

Something is wrong with this workflow. I just looked up the time in Los Angeles. The correct answer is supposed to be 9AM PST. But this workflow shows the answer as 10AM PDT.

 

Screenshot: http://imgur.com/LreeK7X.png

 

As you can see in the screenshot, this workflow is clearly showing LA to be on PDT, but LA is supposed to be on PST until March 10. I looked it up on the World Clock (timeanddate.com) and their information seems to be accurate.

 

I used to love this workflow, and I really appreciate the effort that has been put into this, but I cannot continue using it if such errors persist. 

Edited by parekh
Link to comment

Something is wrong with this workflow. I just looked up the time in Los Angeles. The correct answer is supposed to be 9AM PST. But this workflow shows the answer as 10AM PDT.

 

This is almost certainly due to a daylight savings change in either your city or the city in question. Just run an update "keyword: timezone update" to refresh the workflow's list of city offsets and it should be correct again. (FYI, LA is showing up as PST for me.)

 

Cheers.

Link to comment

This is almost certainly due to a daylight savings change in either your city or the city in question. Just run an update "keyword: timezone update" to refresh the workflow's list of city offsets and it should be correct again. (FYI, LA is showing up as PST for me.)

 

Cheers.

 

Thanks. After I ran the update "keyword: timezone update" the problem was fixed. But it's a bit cumbersome to run this update every time I want to check the time in some city.

Link to comment

Thanks. After I ran the update "keyword: timezone update" the problem was fixed. But it's a bit cumbersome to run this update every time I want to check the time in some city.

You only have to do it every six months, and most of the world changes to DST within a couple of weeks of each other. In fact, for live results like the one in your example, you would only need to update when YOUR location changes to or from DST.

 

Yes, it's a little cumbersome, but that's what allows the main workflow list of cities to be so fast — the timezone offsets are stored locally. If it had to check the current offset for every saved city every time, the list would be a LOT slower.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...