Can I rename a Clock Widget?

Hi guys,

Just wondering if it's possible to re-name my plethora of World clock widgets?

I have about 8 (at present and adding more) showing different times around the world (for suppliers) and it would be great if I could give each one the name of my supplier instead of simply "London" or "Sydney" etc.

Any help appreciated.

Have a great day!

iMac 2.66Ghz/2G b Ram, Mac OS X (10.6.2)

Posted on Feb 25, 2010 1:41 AM

Reply
3 replies

Feb 25, 2010 4:49 AM in response to st3v1e

I am able to do this in 10.5 but do not have 10.6. However, I expect they are similar.

Something Like this?

!http://farm3.static.flickr.com/2713/4386602825 8233cbd5e4o.png!

The above modified one, shows London time but with a custom label achieved by modifying the string in the WorldClock.js file.

I would write down which locations you use, and what names you would like to change them to, that way it will be easier to find them in edit mode.

I used the text editor emacs in Terminal. Other methods would be possible, but this file is owned by root so you need to sudo into it.

Locate the /Library/Widgets/World Clock.wdgt in Finder and Show Package Contents. (Control click on the widget app to get that choice)

Inside the package is a file WorldClock.js owned by root.
This is the file to edit, after you have made a backup copy.

You may like navigate to the directory in Terminal.

I used the command

sudo emacs WorldClock.js



locate the desired string to change, which was in this case;

{city:' London', offset:60, timezone:'Europe/London'},

The first instance 'London' is the clock label. Edit that first one.

Don't touch the second one, or it won't work as I found out.

Save the file. You have made a copy of the original haven't you in case you need to restore the original?

If you are unfamiliar with the emac editor someone may suggest an easier way to perform the edit, but it is really quite straight forward if you know how to drive the text editor.
Typing these instructions has taken way longer than the actual hack.

This could also be used to add your local town to the clock instead of the greater city name provided.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Can I rename a Clock Widget?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.