drwatson Posted December 10, 2015 Posted December 10, 2015 Any way to configure this so that I can see times in 24-hour clock?
drwatson Posted December 12, 2015 Posted December 12, 2015 (edited) Any way to configure this so that I can see times in 24-hour clock? I ended up modifying the script myself. In timezone_list.sh < city_time=$(date -u -j -f %s $city_epochtime +"%T") #Create readable time expression --- > city_time=$(date -u -j -f %s $city_epochtime +"%l:%M %p") #Create readable time expression 157c157 Note the %l:%M %p was changed to simply %H:%M Edited December 12, 2015 by drwatson
CarlosNZ Posted December 13, 2015 Author Posted December 13, 2015 Hi Carlos, Thanks for your workflow. I saw a little discussion about DST in the posts. Any chance you'll add that? For instance, it says it's 10:30pm here in New York, but it's 9:30pm. Paul Hi Paul, hope you've figured it out by now, but you'll just need to run "timezone update" on the workflow to force it refresh its local offset database. It should show the correct time (DST or normal) after that. Carl paulw 1
CarlosNZ Posted December 13, 2015 Author Posted December 13, 2015 I ended up modifying the script myself. In timezone_list.sh < city_time=$(date -u -j -f %s $city_epochtime +"%T") #Create readable time expression --- > city_time=$(date -u -j -f %s $city_epochtime +"%l:%M %p") #Create readable time expression 157c157 Note the %l:%M %p was changed to simply %H:%M Yeah, good, that's what I was going to suggest. I think there's already a couple of posts regarding that further up in this thread. Cheers, Carl.
duffetta Posted May 19, 2016 Posted May 19, 2016 Timezones has stopped working for me. I am not sure if it has to do with El Capitan or Alfred 3. Anyone else experiencing issues? When I run "timezones update" the resulting timezones file for my cities have all of their timezones set to "UTC+". Did El Capitan change the output for the "date" comment in the shell?
FroZen_X Posted May 19, 2016 Posted May 19, 2016 Long time i used the workflow but i redownloaded 1.7 now and it works fine here. Maybe delete and reinstall it ?
duffetta Posted May 19, 2016 Posted May 19, 2016 I uninstalled, downloaded again, and reinstalled. Alfred 2 locations are hard-coded, so I updated update.sh for Alfred 3. All is well.
VALVESSELLER Posted May 22, 2016 Posted May 22, 2016 I uninstalled, downloaded again, and reinstalled. Alfred 2 locations are hard-coded, so I updated update.sh for Alfred 3. All is well. Hi Duffetta, could you please tell me how to update "update.sh" for Alfred 3? I installed TimeZones for Alfred 3, but it doesn't work as well as in Alfred 2. Thank you!
PLANT Posted May 24, 2016 Posted May 24, 2016 Hi Duffetta,same here please,it's stopped working for me on Alfred 3. Can't see the list of my added cities..
VALVESSELLER Posted June 16, 2016 Posted June 16, 2016 (edited) Hi Duffetta,same here please,it's stopped working for me on Alfred 3. Can't see the list of my added cities.. Hi Plant. I solved the problem. If you still need the solution, please try this way. 1. Open the workflow in finder. 2. Find and open the file "includes.sh". 3. Change Alfred-2 to Alfred-3 and Alfred 2 to Alfred 3 in the following lines. TZWD="$HOME/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/carlosnz.timezones" TZPREFS="$HOME/Library/Application Support/Alfred 2/Workflow Data/carlosnz.timezones" Now you will see the workflow works as well as in Alfred 2. Edited June 16, 2016 by VALVESSELLER
duffetta Posted June 16, 2016 Posted June 16, 2016 Hi Plant. I solved the problem. If you still need the solution, please try this way. 1. Open the workflow in finder. 2. Find and open the file "includes.sh". 3. Change Alfred-2 to Alfred-3 and Alfred 2 to Alfred 3 in the following lines. TZWD="$HOME/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/carlosnz.timezones" TZPREFS="$HOME/Library/Application Support/Alfred 2/Workflow Data/carlosnz.timezones" Now you will see the workflow works as well as in Alfred 2. Apologies for not having picked up your questions. I don't visit the Alfred Forums often and I didn't get notified of the activity on this thread. <sigh> Exactly. Just need to have a look at all of the shell scripts and make sure that the paths are correct. There may be environment variables available in the shell that Alfred starts up that would point to these places more generically, so the paths wouldn't need to be hard coded in those shell scripts. I haven't investigated this at all. Just a guess (hope?) Glad that you were able to figure it out. BTW, Thanks @CarlosNZ for a nice solution to the multiple timezone problem, for those of us who work in multiple timezones. Mark
VALVESSELLER Posted June 16, 2016 Posted June 16, 2016 Apologies for not having picked up your questions. I don't visit the Alfred Forums often and I didn't get notified of the activity on this thread. <sigh> Exactly. Just need to have a look at all of the shell scripts and make sure that the paths are correct. There may be environment variables available in the shell that Alfred starts up that would point to these places more generically, so the paths wouldn't need to be hard coded in those shell scripts. I haven't investigated this at all. Just a guess (hope?) Glad that you were able to figure it out. BTW, Thanks @CarlosNZ for a nice solution to the multiple timezone problem, for those of us who work in multiple timezones. Mark Hi, many thanks for taking time checking the issue here. At first, i had to install both Alfred 2 & 3 for the workflow to work well in Alfred 3. Yes, this workflow helps a lot. Regards
Paul Rowe Posted September 1, 2016 Posted September 1, 2016 Hi Guys I am unable to find the "includes.sh" file in the Finder - all I can view is files named "config 1-5" and "timezones.txt" - I am using the latest V1.7 also. Would appreciate help. Kind Regards Paul
CarlosNZ Posted September 3, 2016 Author Posted September 3, 2016 Hi Guys I am unable to find the "includes.sh" file in the Finder - all I can view is files named "config 1-5" and "timezones.txt" - I am using the latest V1.7 also. Would appreciate help. Kind Regards Paul Hi Paul, in Alfred, if you right-click on the workflow (in the Workflows tab), then select "Open in Finder", it'll take you the unpacked workflow in Alfred. the includes.sh file is in there. Cheers, Carl.
Jarek Posted October 15, 2016 Posted October 15, 2016 (edited) Hi, Great tool, however as mentioned earlier, it's missing update to Alfred 3. Attached version compatible with Alfred 3 and one more enhancement: You can enter "tz <time>" in formats HH, HHMM or HH:MM to convert this time to your pre-defined time zones: You can download this version from http://jhartman.webd.pl/files/TimeZones Enhanced.zip (see below for updated version). Feel free to merge this feature to the official release (changed file: timezone_list.sh). Best regards, Jarek Edited January 16, 2017 by Jarek Southgirl 1
mesqueeb Posted November 23, 2016 Posted November 23, 2016 Can I make it so the time's show in 24:00 time format instead of AM PM? Cheers!
Jarek Posted November 23, 2016 Posted November 23, 2016 (edited) On 11/23/2016 at 3:03 PM, mesqueeb said: Can I make it so the time's show in 24:00 time format instead of AM PM? Cheers! Thanks for motivating me for changing it, I also prefer 24-hrs format: New version in http://jhartman.webd.pl/files/TimeZones Enhanced v2.zip (see below for updated version). PS: I've noticed that the tool does not switch DST (e.g. CET <-> CEST) so you need to force update through 'timezone update' keyword. Edited January 16, 2017 by Jarek
Neil D. Posted November 28, 2016 Posted November 28, 2016 Use the workflow often, I was wondering if there was a way to integrate seeing the call codes for the country as well? Lets say im looking up the timezone for Australia - can I get the country's calling code (+61)? Any help on how I can do it myself will be appreciate too
Jarek Posted December 13, 2016 Posted December 13, 2016 (edited) On 11/28/2016 at 7:53 AM, Neil D. said: Use the workflow often, I was wondering if there was a way to integrate seeing the call codes for the country as well? Lets say im looking up the timezone for Australia - can I get the country's calling code (+61)? Any help on how I can do it myself will be appreciate too Hi Neil, You owe me a beer.... at least - a half. A few more updates and: Unfortunately, for some countries it does not work but I don't have time tonight to troubleshoot... After installing v1.8 run "timezone update" or remove + add all defined cities. Cheers, Jarek http://jhartman.pl/files/Alfred time-zones v1.8.zip Edited January 16, 2017 by Jarek Neil D. 1
Neil D. Posted December 20, 2016 Posted December 20, 2016 On 14/12/2016 at 4:09 AM, Jarek said: Hi Neil, After installing v3 run "timezone update" or remove + add all defined cities. Cheers, Jarek Hey Jarek, Damn you work fast! Thanks for the awesome edit! I downloaded it and followed your instructions, it works great. I really really appreciate the help. Lmk where to send the beer. You're the best Best Regards, Neil
Jarek Posted December 20, 2016 Posted December 20, 2016 There is a problem where I don't really have a good idea how to fix: some countries (e.g. USA or UK, see the previous screenshot) does not have phone country code. Easiest way to fix is to open terminal app, execute: open "$HOME/Library/Application Support/Alfred 3/Workflow Data/carlosnz.timezones/timezones.txt" and add country code manually, after the pipe, e.g. Los angeles|Los Angeles|United States|34.0522342|-118.2436849|-28800|America/Los_Angeles|Pacific Standard Time|UTC-8|1 london|London|United Kingdom|51.5073509|-0.1277583|0|Europe/London|Greenwich Mean Time|UTC+0|44 Save the file. Cheers
Jarek Posted January 16, 2017 Posted January 16, 2017 I've done small housekeeping: Changes stored to GitHub and send a pull request to the owner of the master Assigned version v1.8 (no new functionalities comparing to v3) Updated ReadMe Updates notes in my page http://jhartman.pl/tag/alfred/ Version v1.8 can be downloaded from http://jhartman.pl/files/Alfred time-zones v1.8.zip
Berti Posted March 27, 2017 Posted March 27, 2017 great workflow! I found, however, that the times aren't accurate when a country is switching to a different time zone (see the attached screenshot).
Jarek Posted March 27, 2017 Posted March 27, 2017 1 hour ago, Berti said: great workflow! I found, however, that the times aren't accurate when a country is switching to a different time zone (see the attached screenshot). Unfortunately, this is "known issue" ☺️ Invoke "timezone update" to get all your defined locations up to date. And not forget doing it again in 6 months ☺️ Best regards, Jarek
CarlosNZ Posted March 27, 2017 Author Posted March 27, 2017 1 minute ago, Jarek said: Unfortunately, this is "known issue" ☺️ Invoke "timezone update" to get all your defined locations up to date. And not forget doing it again in 6 months ☺️ Best regards, Jarek Yeah, it's the price you pay for speed. I could have it look up the true time difference every single run, but that wouldn't give instant results.
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