Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Add a location to the Time Zone tab System
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:

    • Control-click on "all_cities_adj.plist" and choose "Get Info", then click on "Ownership and Privileges".
    • click on the lock icon
    • change owner from "system" to " (me)" (whoever you are logged in as).
    • at the prompt, enter the root password.
    • close the info window

  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.
    •    
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[7,634 views]  

Add a location to the Time Zone tab | 2 comments | Create New Account
Click here to return to the 'Add a location to the Time Zone tab' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Add a location to the Time Zone tab
Authored by: Peganthyrus on Apr 28, '09 04:29:49PM

This still works perfectly fine under Leopard. Yay! Now I can just type "New Orleans" in the dropdown when I visit home.

Using a programmer's text editor like TextMate obliviates the need to futz around with permissions, as it knows how to ask for authorization to save admin-owned files.



[ Reply to This | # ]
Add a location to the Time Zone tab
Authored by: NeilP on Aug 13, '09 04:48:06AM

It took some time, but I finally did it. I have Leopard 10.5.8 and with that you cant change ownership of the files from the Info pane. So when you edit them with the Mac Text Edit, you then need to use terminal and sudo chown to change ownership back to system.
Or as a previous comment says...use Text Mate and it automatically preserves permissions.



[ Reply to This | # ]