Jump to content

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


Recommended Posts

Hi, I've added your workflow to the [Alfred Workflow List Website] to share with more users. Hope you like it.

This is cool, thanks for building the site, but I would prefer it if you would point the download link to my original location rather than in your github repository. That way I can still keep track of my download numbers and the like. (There are direct download links available for cloud.app (cl.ly) links if you right-click on the download button and select "copy link location").

 

You can find all my other workflows at http://geekzone.philosophicalzombie.net/alfred if you want to add others.

 

Link to comment

This is cool, thanks for building the site, but I would prefer it if you would point the download link to my original location rather than in your github repository. That way I can still keep track of my download numbers and the like. (There are direct download links available for cloud.app (cl.ly) links if you right-click on the download button and select "copy link location").

 

You can find all my other workflows at http://geekzone.philosophicalzombie.net/alfred if you want to add others.

 

Ok, I'll change as you said(cl.ly), tha tis to say everyone now can submit there own direct link. :)

Link to comment

Hello,

 

I've downloaded and installed TimeZones. However, I've got a problem. All answers look like:

 

"New York: _I:27 PM" All hours have been replaced by "_I" 

 

Any idea?

 

Thank in advance for help.

 

Dominique

Hi Dominique,

is this for cities you've added manually, or for the default set?

Link to comment

Hi Carlos,

 

It is the default set. I removed the first installation and try again, same result.

Best regards

I think I've got an idea what's going on. It looks like whatever version of bash you have installed is not interpreting the date/time display string as expected. What version of OS X are you on? Or have you changed your default bash install somehow?

 

Can you try something for me? In the OS X Terminal, can you run the following commands?

date -j -f %s 1364287042 +"%_I:%M %p"

and then this one:

date -j -f %s 1364287042 +"%I:%M %p"

and then report back what you get for each of them? Thanks.

Edited by CarlosNZ
Link to comment

Okay, thanks for doing that. I've got it figured out now. It seems that that particular way of expressing the hour without leading 0's is a more recent development and doesn't work on older systems. However there is a perfectly good alternative. :)

 

I'll put out a proper update for this tomorrow. However, if you'd like to fix it yourself in the meantime, you just need to edit the timezone_list.sh script within the workflow folder.

 

Find this line:

city_time=$(date -u -j -f %s $city_epochtime +"%_I:%M %p") #Create readable time expression

and replace it with this one:

city_time=$(date -u -j -f %s $city_epochtime +"%l:%M %p") #Create readable time expression

That should do the trick! (or just wait and download the proper update tomorrow ;) )

 

Thanks heaps for helping me figure this out. It's always tricky when you can't see how something is going to perform on all systems, so thanks for getting this sorted for the SnowLeopard users.

Link to comment

I am having difficulty adding cities  - cant' add Mumbai.

 

Any thoughts?

Yeah, I know, for some reason Wolfram Alpha just doesn't have the timezone info for Indian cities. It's a pain in the ass.

 

On the plus side, I've found a method using Google Maps APIs to get timezone info, which I think will be much more robust and consistent. So I'll be working on implementing that and ditching Wolfram, but it's going to take a bit of time (maybe a week or two?).

 

In the meantime, if you want Mumbai to show up in the TZ list, you can manually edit the "timezones.txt" file. In particular, add this line:

Mumbai|UTC+5.5

Hope that helps, and look out for a new-and-improved version of this workflow in a week or so.

 

Cheers,

C

Link to comment

Okay, I've posted a small update to deal with the issue raised by Dominique above. (Download link in first post).

 

It simply fixes the time display for older versions of OS X (Snow Leopard, and hopefully earlier). You shouldn't notice any difference if you're on Lion or ML.

 

C

Link to comment

I would be nice if we could choose to display the time in the 24h format. Is it possible?

Sure, but for now you'll need to edit the script yourself. Hope that's cool.

 

In the file called timezone_list.sh, change this line:

city_time=$(date -u -j -f %s $city_epochtime +"%l:%M %p") #Create readable time expression

to the following:

city_time=$(date -u -j -f %s $city_epochtime +"%H:%M") #Create readable time expression

Let me know if you have any probs with that.

 

Cheers.

Link to comment

UPDATED to v1.5

 

Hey guys, fairly significant update here - the workflow now uses Google Maps APIs to get the timezone data, which you should find substantially more reliable than Wolfram Alpha.

 

Also, FLAGS!  :o

fRMCM2D.png   ujpN5bb.png   FRF4wOz.png

See the first post for detailed changelist and download link.

 

PLEASE NOTE: Because this version stores its data substantially differently to previous versions, it will create a new timezones.txt file with default cities. However, it will attempt to save your old timezones.txt file to your Desktop, so you should be able to rebuild your previous list without too much hassle. B) Sorry for any inconvenience.

Edited by CarlosNZ
Link to comment

Hi Carlos.

 

MUCH better thanks. One final question from me. Is it possible to order them by UTC as follows:

 

Los Angeles UTC -7

New York UTC -4

London UTC 0

Mumbai UTC+5.5

Tokyo UTC +9

 

Can't get the $RANDOM fix you mentioned earlier to do this to work.

Thanks great work!!

Edited by nickwild
Link to comment

Hi Carlos.

 

MUCH better thanks. One final question from me. Is it possible to order them by UTC as follows:

 

Los Angeles UTC -7

New York UTC -4

London UTC 0

Mumbai UTC+5.5

Tokyo UTC +9

 

Can't get the $RANDOM fix you mentioned earlier to do this to work.

Thanks great work!!

I think you'll have to manually edit the timezones.txt file to put them in the order you want (as well as the $RANDOM id thing). Or just delete the cities one by one using the workflow and re-add them in the order you want. Sorry I can't make it easier than that, but sort order is a whole extra level of complexity that I haven't even thought about yet.

Link to comment

v1.6 released.

 

One main new feature: custom lookups — just keep typing after the tz to look up the time in a place without saving it to your list:

screenshot20130331at103.png

 

Also, I've added experimental support for autocomplete for adding place names. You'll need to add a keyword yourself to the script filter if you want to try it out. The reason I haven't enabled it by default is that I've found it kind of slow and I'm not sure it's actually an improvement over the current method. I'd be keen to know what people think. :unsure:

 

Full deets and download link in initial post (now supports Alleyoop auto-updates too ;) ).

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...