Welcome to MacForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

How do I set Time Zone (OS X)

 
   Macintosh computer (Home) -> System RSS
Next:  Program installation program  
Author Message
nospamnov2004

External


Since: Nov 03, 2004
Posts: 11



(Msg. 1) Posted: Sun Nov 28, 2004 2:40 am
Post subject: How do I set Time Zone (OS X)
Archived from groups: comp>sys>mac>system (more info?)

While travelling I pass through some time zone that are not covered by
the list of cities in the System Preferences. In some cases these are
local time zones in remote areas, so there is no appropriate large city
nearby in any case.

Does anyone know how I can get additional cities into the Time Zone
settings? Some plist somewhere maybe?

In Terminal, I can find time zone information for cities that do not
appear in the GUI. For example, under Australia, there is a file for
Broken_Hill, which although nominally uses the NSW (Sydney) time zone,
actually needs most of the time zone information a different state
(Adelaide in SA). There is a zone information compiler included, and so
you can make up your own time zone files (I specifically want one for
the unofficial Mid West Australian time zone, covering Eucla and Border
Crossing) however I can't see how to tell the GUI to use any such file I
might generate.

Does anyone have any idea how to solve this?

--
http://www.ericlindsay.com

 >> Stay informed about: How do I set Time Zone (OS X) 
Back to top
Login to vote
Jeremy Nixon

External


Since: Mar 28, 2004
Posts: 139



(Msg. 2) Posted: Sun Nov 28, 2004 4:40 am
Post subject: Re: How do I set Time Zone (OS X) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Eric Lindsay wrote:

 > Does anyone know how I can get additional cities into the Time Zone
 > settings? Some plist somewhere maybe?

Unfortunately, the GUI seems to have a fixed list of available time zones,
rather than using the system's idea of what zones exist. In fact, there
are some handy files that exist in the Olsen time zone distribution, which
is what everyone uses, that do exist on FreeBSD but have been omitted by
Apple in OS X for some obscure reason -- files I've used myself to make
a GUI for time zone selection based on the existing list of zones (not on
OS X). But in any case, no, the Preferences GUI does not take into account
what time zones actually exist on the system, and I know of no way to add
zones to the GUI.

However, I don't *think* the GUI is any more than a front-end to set the TZ
environment variable. So, if you have a time zone file on the system that
the GUI doesn't know about, you should be able to use it fully by setting
TZ in your environment manually.

You can set environment variables for the full GUI session in the
~/.MacOSX/environment.plist file, which is a file in plist format. If it
doesn't exist, create it to look roughly like this:

<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>TZ</key>
<string>My_Wacky_Timezone</string>
</dict>
</plist>

Obviously, replace My_Wacky_Timezone with the time zone you want to use,
which is the name of the zoneinfo file including the subdirectory it's in,
for example "America/New_York". If the environment.plist file already
exists, just add the <key> and <string> pair to it.

You'll need to log out and back in to make the change take effect.

Then, I guess, don't open the time zone preferences, because it's likely
to mess things back up again.

--
Jeremy | jeremy DeleteThis @exit109.com<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: How do I set Time Zone (OS X) 
Back to top
Login to vote
Ron Parsons

External


Since: Jan 29, 2004
Posts: 104



(Msg. 3) Posted: Sun Nov 28, 2004 6:40 am
Post subject: Re: How do I set Time Zone (OS X) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article ,
Jeremy Nixon <jeremy DeleteThis @exit109.com> wrote:


 >
  >> Does anyone know how I can get additional cities into the Time Zone
  >> settings? Some plist somewhere maybe?
 >
 >Unfortunately, the GUI seems to have a fixed list of available time zones,
 >rather than using the system's idea of what zones exist. In fact, there
 >are some handy files that exist in the Olsen time zone distribution, which
 >is what everyone uses, that do exist on FreeBSD but have been omitted by
 >Apple in OS X for some obscure reason -- files I've used myself to make
 >a GUI for time zone selection based on the existing list of zones (not on
 >OS X). But in any case, no, the Preferences GUI does not take into account
 >what time zones actually exist on the system, and I know of no way to add
 >zones to the GUI.
 >
 >However, I don't *think* the GUI is any more than a front-end to set the TZ
 >environment variable. So, if you have a time zone file on the system that
 >the GUI doesn't know about, you should be able to use it fully by setting
 >TZ in your environment manually.
 >
 >You can set environment variables for the full GUI session in the
 >~/.MacOSX/environment.plist file, which is a file in plist format. If it
 >doesn't exist, create it to look roughly like this:
 >
 ><!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
 >"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 ><plist version="1.0">
 ><dict>
 > <key>TZ</key>
 > <string>My_Wacky_Timezone</string>
 ></dict>
 ></plist>
 >
 >Obviously, replace My_Wacky_Timezone with the time zone you want to use,
 >which is the name of the zoneinfo file including the subdirectory it's in,
 >for example "America/New_York". If the environment.plist file already
 >exists, just add the <key> and <string> pair to it.
 >
 >You'll need to log out and back in to make the change take effect.
 >
 >Then, I guess, don't open the time zone preferences, because it's likely
 >to mess things back up again.

With that last sentence being a key, the old Map Control Panel still
exists under Applications (Mac OS 9):Apple Extras:Map Control Panel.

--
Ron Parsons<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: How do I set Time Zone (OS X) 
Back to top
Login to vote
nospamnov2004

External


Since: Nov 03, 2004
Posts: 11



(Msg. 4) Posted: Sun Nov 28, 2004 10:40 pm
Post subject: Re: How do I set Time Zone (OS X) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article ,
Jeremy Nixon <jeremy.RemoveThis@exit109.com> wrote:

 >
 > You can set environment variables for the full GUI session in the
 > ~/.MacOSX/environment.plist file, which is a file in plist format.

Many thanks for explaining that, and pointing me at the plist (it didn't
exist previously). There certainly seems a lot to learn about OS X.
I'll do some experimenting with it before my next travel to a weird time
zone.

Another poster mentioned OS 9. I did previously find the Mac OS 9 map,
but decided that as I've never used Mac OS 9 and don't (knowingly) have
any Classic applications, that I wouldn't get involved with any tricks
that predated OS X.

Thanks.

--
<a style='text-decoration: underline;' href="http://www.ericlindsay.com" target="_blank">http://www.ericlindsay.com</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: How do I set Time Zone (OS X) 
Back to top
Login to vote
Tom Harrington

External


Since: Aug 19, 2003
Posts: 940



(Msg. 5) Posted: Mon Nov 29, 2004 12:09 am
Post subject: Re: How do I set Time Zone (OS X) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article
,
Eric Lindsay <NOSPAMnov2004.DeleteThis@ericlindsay.com> wrote:



 >
  > >
  > > You can set environment variables for the full GUI session in the
  > > ~/.MacOSX/environment.plist file, which is a file in plist format.
 >
 > Many thanks for explaining that, and pointing me at the plist (it didn't
 > exist previously). There certainly seems a lot to learn about OS X.
 > I'll do some experimenting with it before my next travel to a weird time
 > zone.

Just out of curiosity, could you give an example of a time zone where
this is a problem? A couple of jobs ago I was responsible for writing
the time-zone handling code for an operating system, and I'm surprised
Apple wouldn't have found a way to make them all available somehow.

--
Tom "Tom" Harrington
Macaroni, Automated System Maintenance for Mac OS X.
Version 2.0: Delocalize, Repair Permissions, lots more.
See <a style='text-decoration: underline;' href="http://www.atomicbird.com/" target="_blank">http://www.atomicbird.com/</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: How do I set Time Zone (OS X) 
Back to top
Login to vote
Roger Johnstone1

External


Since: May 14, 2004
Posts: 93



(Msg. 6) Posted: Mon Nov 29, 2004 5:40 am
Post subject: Re: How do I set Time Zone (OS X) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In Tom Harrington wrote:
 > In article


 >


  >>
   >> >
   >> > You can set environment variables for the full GUI session in the
   >> > ~/.MacOSX/environment.plist file, which is a file in plist format.
  >>
  >> Many thanks for explaining that, and pointing me at the plist (it
  >> didn't exist previously). There certainly seems a lot to learn
  >> about OS X. I'll do some experimenting with it before my next
  >> travel to a weird time zone.
 >
 > Just out of curiosity, could you give an example of a time zone where
 > this is a problem? A couple of jobs ago I was responsible for writing
 > the time-zone handling code for an operating system, and I'm surprised
 > Apple wouldn't have found a way to make them all available somehow.

I suppose adding "Other..." and letting the user type in whatever time
zone offset they wanted would be too simple.

Pet peeve: software which only lets you set the time zone to +/- 12
hours from UTC. During summer New Zealand uses UTC+13 hours!

--
Roger Johnstone, Invercargill, New Zealand
<a style='text-decoration: underline;' href="http://vintageware.orcon.net.nz/" target="_blank">http://vintageware.orcon.net.nz/</a>
________________________________________________________________________
No Silicon Heaven? Preposterous! Where would all the calculators go?

Kryten, from the Red Dwarf episode "The Last Day"<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: How do I set Time Zone (OS X) 
Back to top
Login to vote
Tom Harrington

External


Since: Aug 19, 2003
Posts: 940



(Msg. 7) Posted: Mon Nov 29, 2004 10:42 am
Post subject: Re: How do I set Time Zone (OS X) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article ,
Roger Johnstone <rojaws.DeleteThis@orcon.net.nz> wrote:


  > > In article


  > >


   > >>
   > >> >
   > >> > You can set environment variables for the full GUI session in the
   > >> > ~/.MacOSX/environment.plist file, which is a file in plist format.
   > >>
   > >> Many thanks for explaining that, and pointing me at the plist (it
   > >> didn't exist previously). There certainly seems a lot to learn
   > >> about OS X. I'll do some experimenting with it before my next
   > >> travel to a weird time zone.
  > >
  > > Just out of curiosity, could you give an example of a time zone where
  > > this is a problem? A couple of jobs ago I was responsible for writing
  > > the time-zone handling code for an operating system, and I'm surprised
  > > Apple wouldn't have found a way to make them all available somehow.
 >
 > I suppose adding "Other..." and letting the user type in whatever time
 > zone offset they wanted would be too simple.

It would be, if for no other reason than that the zone offset varies
depending on summer time vs. winter time. Setting clocks ahead and
behind at different times of year is pretty common, and users generally
expect their computers to handle this automatically. Entering an offset
would in many places require the user to reset the offset twice a year.

If it were me I'd try to come up with a user-friendly wrapper around the
tzselect(8) command, which is designed to help people find the right
time zone for their computer. It doesn't seem that Apple has included
this on Mac OS X, but it's available as open-source code should they
change their mind.

--
Tom "Tom" Harrington
Macaroni, Automated System Maintenance for Mac OS X.
Version 2.0: Delocalize, Repair Permissions, lots more.
See <a style='text-decoration: underline;' href="http://www.atomicbird.com/" target="_blank">http://www.atomicbird.com/</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: How do I set Time Zone (OS X) 
Back to top
Login to vote
Jeremy Nixon

External


Since: Mar 28, 2004
Posts: 139



(Msg. 8) Posted: Mon Nov 29, 2004 3:40 pm
Post subject: Re: How do I set Time Zone (OS X) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Roger Johnstone wrote:

 > I suppose adding "Other..." and letting the user type in whatever time
 > zone offset they wanted would be too simple.

The problem with time zone offsets is that they are ambiguous, and would
require manual updates. If you were to enter -0500, for example, that
could be US Eastern time, or it could be US Central time during the summer.
You really want to go by location rather than offset.

Adding "Other..." and letting the user enter the name of a zoneinfo file
that exists on the system but not in the GUI would be a pretty easy fix,
though. I actually tried that in the interface before posting my previous
reply, because I assumed it would work, but it didn't.

 > Pet peeve: software which only lets you set the time zone to +/- 12
 > hours from UTC. During summer New Zealand uses UTC+13 hours!

Most mistakes in time and date handling code are simply incorrect
assumptions about how things work. Most people don't realize how
complicated time and date measurement really is.

--
Jeremy | jeremy DeleteThis @exit109.com<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: How do I set Time Zone (OS X) 
Back to top
Login to vote
nospamnov2004

External


Since: Nov 03, 2004
Posts: 11



(Msg. 9) Posted: Tue Nov 30, 2004 3:40 am
Post subject: Re: How do I set Time Zone (OS X) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article ,
Tom Harrington <tph.RemoveThis@pcisys.no.spam.dammit.net> wrote:

 > Just out of curiosity, could you give an example of a time zone where
 > this is a problem? A couple of jobs ago I was responsible for writing
 > the time-zone handling code for an operating system, and I'm surprised
 > Apple wouldn't have found a way to make them all available somehow.

Broken Hill (a mining town near the SA and NSW border in Australia)
should on the basis of its geography be in the NSW time zone (set as
Sydney time). However because the largest nearby city is in South
Australia, it uses SA time (with slight changes I believe in Daylight
Saving start or end dates to match NSW). There is no GUI setting that
copes with this, although the Apple does have a time zone file for
Broken Hill.

There are some very remote small towns near the border of WA and SA.
These are so distant from the capitol (Perth - it is a very wide state)
that Perth time is totally unsuitable. As a result Eucla and Border
Crossing run 45 minutes before Perth time (and 45 minutes after Adelaide
time, that being the nearest capitol). So it is a very non-standard
time zone, but matches the sun rather nicely.

I think the problem with Apple is that they haven't made access to the
GUI interface available for all the time zones that exist. As I
mentioned, there is a Zone Information Compiler available from Terminal,
and in the Australia section, Broken_Hill already exists.

--
<a style='text-decoration: underline;' href="http://www.ericlindsay.com" target="_blank">http://www.ericlindsay.com</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: How do I set Time Zone (OS X) 
Back to top
Login to vote
Obfus Kataa

External


Since: Dec 21, 2003
Posts: 34



(Msg. 10) Posted: Tue Nov 30, 2004 6:38 pm
Post subject: Re: How do I set Time Zone (OS X) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Does the timezone info come from
/System/Library/PreferencePanes/DateAndTime.prefPane/Contents/Resources/TimeZone.prefPane/Contents/Resources/all_cities_adj.plist

I edited that file to add information for America/Louisville some time ago
and to add my own nearby city. I get those in my list of cities in the
preferences and the crosshairs appear to be in the correct place on the map.
The header says to look for the Timezone file in /usr/share/zoneinfo and to
reference the name stored in field four of each entry.

Maybe this doesn't work for entries that fall between zones, perhaps I only
have it because I upgraded along the way (10.1.5 to 10.3.6)

--
oK+++
DOWN WITH BUS^H^H^HASH^H^H^HBIG BROTHER
17:27 up 7 days, 6:38, 1 user, load averages: 0.16 0.18 0.13
 >> Stay informed about: How do I set Time Zone (OS X) 
Back to top
Login to vote
Obfus Kataa

External


Since: Dec 21, 2003
Posts: 34



(Msg. 11) Posted: Tue Nov 30, 2004 6:40 pm
Post subject: Re: How do I set Time Zone (OS X) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I just found an article about adding a city to the Timezone for Jaguar.
This must be what I did on my system:
http://www.macosxhints.com/article.php?story=20020831074937191

--
oK+++
 >> Stay informed about: How do I set Time Zone (OS X) 
Back to top
Login to vote
Obfus Kataa

External


Since: Dec 21, 2003
Posts: 34



(Msg. 12) Posted: Tue Nov 30, 2004 7:31 pm
Post subject: Re: How do I set Time Zone (OS X) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Tue, 30 Nov 2004 (15:59 -0700 UTC) Tom Harrington wrote:



 >
  >> Does the timezone info come from
  >> /System/Library/PreferencePanes/DateAndTime.prefPane/Contents/Resources/TimeZo
  >> ne.prefPane/Contents/Resources/all_cities_adj.plist
 >
 > Yes...
 >
  >> I edited that file to add information for America/Louisville some time ago
  >> and to add my own nearby city. I get those in my list of cities in the
  >> preferences and the crosshairs appear to be in the correct place on the map.
  >> The header says to look for the Timezone file in /usr/share/zoneinfo and to
  >> reference the name stored in field four of each entry.
 >
 > Right...
 >
  >> Maybe this doesn't work for entries that fall between zones, perhaps I only
  >> have it because I upgraded along the way (10.1.5 to 10.3.6)
 >
 > Are you actually having some kind of problem? I guess I'm not sure what
 > you're getting at here.

No, it is possible that I missed some replies in the thread. I thought the
OP was looking for some way to add his TimeZone, and that he wasn't that
concerned about the method. The drift of the posts I saw was that there was
no ready way, but this seems pretty simple if you are used to editing
configuration files by hand, which I assumed someone who'd written a manual
for a homebrew 68000 computer might be.

--
oK+++
Mistakes live in the neighbourhood of truth and therefore delude us.
-Rabindranath Tagore
18:27 up 7 days, 7:39, 1 user, load averages: 0.02 0.07 0.07<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: How do I set Time Zone (OS X) 
Back to top
Login to vote
Obfus Kataa

External


Since: Dec 21, 2003
Posts: 34



(Msg. 13) Posted: Wed Dec 01, 2004 6:36 am
Post subject: Re: How do I set Time Zone (OS X) [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Wed, 1 Dec 2004 (05:22 -0000 UTC) Eric Lindsay wrote:



 >
  >> Does the timezone info come from
  >> /System/Library/PreferencePanes/DateAndTime.prefPane/Contents/Resources/TimeZo
  >> ne.prefPane/Contents/Resources/all_cities_adj.plist
 >
 > I have the same file, and I've never had anything prior to OS X 10.3
 >
  >> I edited that file to add information for America/Louisville some time ago
  >> and to add my own nearby city. I get those in my list of cities in the
  >> preferences and the crosshairs appear to be in the correct place on the map.
  >> The header says to look for the Timezone file in /usr/share/zoneinfo and to
  >> reference the name stored in field four of each entry.
 >
 > While travelling I had looked at the /usr/share/zoneinfo area, and noted
 > that not all cities listed there appeared in the GUI. I didn't find the
 > appropriate pref file mentioned above.
 >
 > How did you generate your file to place here? Did you just make a copy
 > of an existing nearby city file, or did you generate a new one by using
 > the Zone Information Compiler (zic) ?

I began by using a nearby city (Louisville, KY) which I copied from a
FreeBSD zoneinfo database I had. That was before I discovered the
prefrencepane file. I do not have a file in zoneinfo for the town in which
I live which is in the same timezone as is Louisville. But the crosshairs
in the timezone tab look to be correct for the lat/long I entered in the
prefpane config file, and the switch from daylight to standard occurs
correctly. I also have added to ~/.MacOSX/environment.plist the following:
<key>TZ</key>
<string>America/Louisville</string>

I should read the man page for zic more closely to see how to create a file
for my town. Is there a zic decompiler? Editing an existing file from a
nearby town would be much simpler than tracking down the history of timezone
changes to satisfy the fields zic appears to need.

--
oK+++<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: How do I set Time Zone (OS X) 
Back to top
Login to vote
Display posts from previous:   
   Macintosh computer (Home) -> System All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]