Add a location to the Time Zone tab

Aug 31, '02 07:49:37AM

Contributed by: joewhite

It had always bugged me that the Date and Time control panel never had Houston listed as a choice, even though smaller towns like Dallas and Austin were included. Hoping this oversite would be corrected in 10.2, I was saddened to find out Houston still wasn't listed. But it turns out it is not very difficult to add any city or place (remember "Middle of Nowhere"?) to the prefs panel.

Read the rest of the article for the how-to...

Add any city to the Time Zone tab of the Date and Time prefs panel

  1. Make a backup of /System -> Library -> PreferencePanes -> DateAndTime.prefPane" somewhere safe.

  2. Control-click on "DateAndTime.prefPane" and choose "Show Package Contents".

  3. Open "Contents/Resources".

  4. Control-click on "TimeZone.prefPane" and choose "Show Package Contents".

  5. Open "Contents/Resources".

  6. Thanks to 10.2, it is now very easy to change ownership of files and folders from the Finder:


  7. Open "all_cities_adj.plist" in a text editor (I prefer Tex-Edit Plus).

  8. Near the top, you will notice the format for the entries in this file:
    Line	Usage		Acceptable Values
    1 Latitude -90.0 to 90.0 (in decimal format)
    2 Longitude -180.0 to 180.0 (in decimal format)
    3 TimeZoneIndex 0-27 used to show timezone "band"
    4 TimeZone file path in /usr/share/zoneinfo directory
    5 Modem Code Approved modem code for the country
    6 City Name Unlocalized version of City
    7 Country Name Unlocalized version of Country
  9. Enter the information for the city you wish to add in the correct alphabetical order; for instance, Houston would go between Honolulu and Indianapolis, and look like this:
      <array>
    <string>29.763000</string>
    <string>-96.363000</string>
    <string>5</string>
    <string>US/Central</string>
    <string>US</string>
    <string>Houston</string>
    <string>U.S.A.</string>
    </array>
  10. Save the changes.

  11. Using the method in step six, change the ownership back to "system".

  12. Open "English.lproj"

  13. Using the method in step six, change the ownership of "Localizable_Cities.strings" to you.

  14. Open "Localizable_Cities.strings" in your favorite editor.

  15. add an entry for your new city in the correct alphabetical order; Houston's would be:
    "Houston" = "Houston";
  16. Save the changes.

  17. Using the method in step six, change the ownership back to "system".
If you've done everything right, your city should now be available in the Time Zones tab. You may have to quit and restart the System Prefs application to see the effect of the changes.

Comments (2)


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