How can I add a UTC world clock to my OSX dashboard?
In the OSX dashboard, the world clock doesn't have a UTC option. Choosing London only works half of the year (the other half London is on Daylight Savings Time and is UTC+1).
I could choose Atlantic/Reykjavik, which is always on UTC, but it seems like a hack, and I'd rather have my clock display "UTC" instead of "Reykjavik".
Solution 1:
There is already a UTC clock available.
Assuming you're on Yosemite:
- Go to your notification center
- Click Edit at the bottom
- Add the World Clock and click Done.
- Hover over the World Clock you just added, and click on the (i) icon.
- Enter UTC when it asks for City.
- That's it. You're done.
Solution 2:
You can edit the source of the world clock widget to add UTC:
cd /Library/Widgets
sudo vi WorldClock.js
Since Mac OS El Capitan, the file is now found here:
cd /Library/Widgets/World Clock.wdgt/
sudo vi WorldClock.js
Then, in the Europe section, add the line:
{city:'UTC', offset:0, timezone:'UTC', id:"2647937"},
The "city" will become the display name of the clock widget; it can be whatever you like.
You may need to remove and recreate any existing clocks in your dashboard for UTC to show up in the list. Since Mac OS Mojave, you will need to kill the DashboardClient process to see the new option (it will restart on its own):
killall DashboardClient