[comp.unix.aux] Can A/UX tell time

steve@ivucsb.UUCP (Steve Lemke) (02/05/89)

After reading the man page on setmactime, I was under the impression that
A/UX realized that the time in the (battery backed up) system clock in the
Mac II is my local (PST/PDT/whatever) time, and that it needed to adjust
according to the environment variable TZ to figure out GMT - which is what
it likes to tell time in.  Then, it should be able to use TZ to tell ME
what time it is in my local time.
 
Well, what happens in this:  Let's assume it's 2pm pacific time.  If I boot
A/UX, when "date" is executed as part of startup (or if I type it myself)
I get 6am PST.  A/UX obviously interpreted my system clock (2pm) as being
in GMT, and then subtracted eight hours and then announces that it's 6am
PST.

How do I fix this?  I thought typing setmactime would do the trick - it
seemed to, but when I finished using the machine and shut it down it must
have forgotten or something - this morning when I fired it up it was back
to the way described above.  If there is a simple (or even not so simple)
fix for this, or just something I'm doing wrong, I'd love to hear about it.

Thanks much, in advance!
 
----- Steve Lemke ------------------- "MS-DOS (OS/2, etc.) - just say no!"
----- Internet: lemke@apple.ucsb.edu                 AppleLink:  Lemke    
----- Or try:   pyramid!nessus!ivucsb!steve          CompuServe: 73627,570
----- Quote:    "What'd I go to college for?"   "You had fun, didn't you?"

phil@Apple.COM (Phil Ronzone) (02/14/89)

In article <521@ivucsb.UUCP> lemke@apple.ucsb.edu writes:
>After reading the man page on setmactime, I was under the impression that
>A/UX realized that the time in the (battery backed up) system clock in the
>Mac II is my local (PST/PDT/whatever) time, and that it needed to adjust
>according to the environment variable TZ to figure out GMT - which is what
>it likes to tell time in.  Then, it should be able to use TZ to tell ME
>what time it is in my local time....

The environment variables, such as TZ, are for telling the system to
DISPLAY time in your time zone format (remember, user xyz can be logged
into your system from around the world -- and that user would set TZ to
something else).

The one extra step, (it's in the manual) is to tell the system how
far the local clock is from UTC/GMT -- the "GMT" bias. This is how many
minutes your are "from" GMT. For example, here in CA, we are -480 minutes.
This is all required because the Mac OS keeps the battery backup up clock chip
in local time. We keep the GMT bias in PRAM, so, once set, it will be
used across reboots.


+------------------------+-----------------------+----------------------------+
| Philip K. Ronzone      | A/UX System Architect | APPLELINK: RONZONE1        |
| Apple Computer MS 27AJ +-----------------------+----------------------------+
| 10500 N. DeAnza Blvd.  | There's a million things we'd like to say, but we  |
| Cupertino CA 95014     | aren't supposed to piss anybody off. Oh well ...   |
+------------------------+----------------------------------------------------+
|{amdahl,decwrl,sun,voder,nsc,mtxinu,dual,unisoft}!apple!phil                 |
+-----------------------------------------------------------------------------+

lemke@cherry.ucsb.edu (Steve C. Lemke) (02/14/89)

In article <25736@apple.Apple.COM> phil@Apple.COM (Phil Ronzone) writes:
}The one extra step, (it's in the manual) is to tell the system how
                      ^^^^^^^^^^^^^^^^^^ (I found it after I wrote my msg.)
}far the local clock is from UTC/GMT -- the "GMT" bias.

To those who were thinking of replying to my "time" message either to the net
or to me personally, I figured out the solution just after getting really
frustrated and typing in that message.  I then sent a "cancel" message in
hopes of avoiding many replies (and "duhh, what an idiot" thoughts in your
minds), but it seems that my system ate (cancelled? :-) the cancel message.

I guess what I've learned here is that no matter how frustrated I may get
while trying to figure something out, if I enter a message into comp.unix.aux
then I'm bound to figure it out shortly thereafter.  I'll try to pull some
more hair out before asking next time! :-)

Steve Lemke
lemke@apple.ucsb.edu