24-Hour Time Misformatting

I really hate it when companies mess up the formatting for 24-hour time. Adrienne’s phone does this too, but in a worse way.

There are two basic rules of formatting time:

  1. In 24-hour time, hours less than 10 should be zero-prefixed, so 00, 01, 02, etc.
  2. In 12-hour time, hours should never be zero-prefixed. One does not write 06 PM. It doesn’t make sense!

Mac OS X Tiger messed it up. It was right in Panther. Why, Apple?!

Update: No, the settings in [International -> Formats -> Times -> Customize… ] appear to have nothing to do with the time in the menu bar. Actually I have no idea what those are used for, but definitely not the menu bar time. Try again!

5 thoughts on “24-Hour Time Misformatting

  1. They have messed up the default then. You can still fix it under System Preferences > International > Formats > Time > Customize > [ ] Use leading zero for hour.

  2. Indrek: You beat me to it. I was just about to add that, and noticed that you were already on top of it.

    Yay for configurability!

  3. I would be very interested to hear what causes it for you because I can’t duplicate your “no-leading zero” issue on my Powerbook running 10.4.1. I even set my clock back to just after midnight to test and everything I did had a leading zero before it.

  4. It appears that Apple has changed how the menu bar clock reads it’s formatting. Look in /System/Library/CoreServices/Menu Extras/Clock.menu/Contents/Resources/English.lproj: Localizable.strings


    /* 1st menu item date/time format string */
    /* NO LONGER USED. The first menu item displayed now uses NSDateFormatString */
    /* it doesn't include the time, but it solves a lot of localization issues and works */
    /* around some Foundation / International prefs interaction issues */
    /*"MBC_DATETIME_MENUITEM_FORMAT" = "%A %1m/%e/%Y %1I:%M%p"; */

    /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
    /* The following 3 strings are used to set up the format the menu bar clock will use */

    /* Localizations needs to follow these instructions for the menu clock to work properly. */

    /* MBC_CLOCK_FORMAT_STRING is the main format string. It MUST contain a %a, %time, and %p */
    /* The order of the items can vary and any additional characters or punctuation is ok */
    /* For example, you could put the short day of week at the END of the menu bar clock by */
    /* changing the format to: "%time%p %a" */
    //"MBC_CLOCK_FORMAT_STRING" = "%a %time%p";
    "MBC_CLOCK_FORMAT_STRING" = "%a %time";

    So anyhow, from playing around with the variables, and the com.apple.MenuBar.plist preferences file in ~/Preferences, it appears that the new formatting method is broken, and that it is not really pulling the formatting from the International Preferences as it should be, but is rather just using it’s defaults. If you modify the formatting string in the plist, and it no longer is in it’s “standard” format, it just resets it.

    Interesting, indeed.

  5. Derek: Are you running an upgraded machine from Panther, or did you do a clean install?

    I know myself and my brother both did clean installs, so that may have something to do with it.

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s