Add the date to the menubar in 10.2

Sep 07, '02 10:30:47AM

Contributed by: dsk

Over on this thread in the macosxhints' forums, someone asked how to change the Menubar clock display to include the date. There was a hint for this under Mac OS 10.1, but the method didn't work under Jaguar. Thanks to a great discovery by SpongeBob, it is now possible.

To customize your Menubar clock in Jaguar, you must edit the file:

/Users/username/Library/Preferences/.GlobalPreferences.plist
Replace username with your user name. Specifically, you must edit the key "NSTimeFormatString" in the referenced file. You can add, move, or remove the various components of the format. The default is %1I:%M:%S; to find other "%" codes to use, type
man strftime
in a Terminal window. For example, I have my NSTimeFormatString set up as %b %e - %1I:%M:%S, which shows up as "Sep 4 - 4:55". Once you have saved the changes to .GlobalPreferences.plist (I used pico to make the changes), go into System Preferences -> Date and Time -> Menu Bar Clock and deactivate and then reactivate the clock. You should see the changes to the clock.

Note: Depending on which options ("Display time with seconds," "Show day of the week," etc.) for the Menu Bar Clock you have set in System Preferences, you may create redundancies. To be on the safe side, disable all these prefs and then use the above method to add exactly what you want.

Comments (25)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20020907073047908