CarlosNZ Posted March 24, 2013 Author Share Posted March 24, 2013 Hi, I've added your workflow to the [Alfred Workflow List Website] to share with more users. Hope you like it. http://www.alfredworkflow.com/#TimeZones 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
Jonathan Tom Posted March 24, 2013 Share Posted March 24, 2013 Hi Carlos, No worries about editing the time zone file, I only really need to do it once... I'm right outside of Toronto, Canada. I'll keep an eye on this thread for any updates - again, thanks for all the help! Link to comment
hzlzh Posted March 25, 2013 Share Posted March 25, 2013 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
domvuillaume Posted March 25, 2013 Share Posted March 25, 2013 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 Link to comment
CarlosNZ Posted March 25, 2013 Author Share Posted March 25, 2013 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
domvuillaume Posted March 26, 2013 Share Posted March 26, 2013 Hi Carlos, It is the default set. I removed the first installation and try again, same result. Best regards Link to comment
CarlosNZ Posted March 26, 2013 Author Share Posted March 26, 2013 (edited) 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 March 26, 2013 by CarlosNZ Link to comment
domvuillaume Posted March 26, 2013 Share Posted March 26, 2013 I will try. I have OS 10.6.8 'snow leopard) running on the so-called "white" macbook. Too old? Link to comment
domvuillaume Posted March 26, 2013 Share Posted March 26, 2013 I've tried. The first command returns "_I:37" The second "09:37" so much better. What's next? Thank Link to comment
CarlosNZ Posted March 26, 2013 Author Share Posted March 26, 2013 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
domvuillaume Posted March 26, 2013 Share Posted March 26, 2013 It works fine with this little change in this script file.... Thank you very much for your help. Dominique Link to comment
nickwild Posted March 26, 2013 Share Posted March 26, 2013 I am having difficulty adding cities - cant' add Mumbai. Any thoughts? Thanks for a great workflow Link to comment
CarlosNZ Posted March 26, 2013 Author Share Posted March 26, 2013 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
CarlosNZ Posted March 26, 2013 Author Share Posted March 26, 2013 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
tleveque Posted March 27, 2013 Share Posted March 27, 2013 Hi, Nice workflow! I would be nice if we could choose to display the time in the 24h format. Is it possible? Link to comment
CarlosNZ Posted March 28, 2013 Author Share Posted March 28, 2013 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
CarlosNZ Posted March 28, 2013 Author Share Posted March 28, 2013 (edited) 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! 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. Sorry for any inconvenience. Edited March 28, 2013 by CarlosNZ nickwild and dan_djorgi 2 Link to comment
nickwild Posted March 28, 2013 Share Posted March 28, 2013 (edited) 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 March 29, 2013 by nickwild Link to comment
Jonathan Tom Posted March 28, 2013 Share Posted March 28, 2013 After the update, all seems to work here - thanks for the switch to Google it feels really zippy now! CarlosNZ 1 Link to comment
Carlos-Sz Posted March 28, 2013 Share Posted March 28, 2013 The new version is simple great! The flags addition made the workflow perfect. CarlosNZ 1 Link to comment
CarlosNZ Posted March 29, 2013 Author Share Posted March 29, 2013 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
nickwild Posted March 29, 2013 Share Posted March 29, 2013 (edited) OK thanks Carlos. I did reorder them in the timezones.txt, but it made no difference. Will try deleting and adding manually. Thanks again Nick EDIT. This worked thanks Edited March 29, 2013 by nickwild Link to comment
CarlosNZ Posted March 31, 2013 Author Share Posted March 31, 2013 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: 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. Full deets and download link in initial post (now supports Alleyoop auto-updates too ). dan_djorgi 1 Link to comment
CarlosNZ Posted April 1, 2013 Author Share Posted April 1, 2013 v1.61 Small fix for Dutch (Netherlands) flag matching. Link to comment
blueshirt Posted April 1, 2013 Share Posted April 1, 2013 Thank you yet again for another wonderful workflow. I had issues with previous versions but 1.61 seems to fix everything. Successfully updated via Alleyoop. I love tz nameofthecity functionality. Switching from Wolfram Alpha improved accuracy, at least here. CarlosNZ 1 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now