Port-amiga archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: localtime
On Thu, Jun 18, 1998 at 09:18:00PM +0200, Georges Heinesch wrote:
> During the Installation of NetBSD, I set my timezone correctly
> (Luxembourg, CEST, UTC-2). The system time of my Amiga is set to
> local time. I guess that is the correct way to do it.
>
> When I start NetBSD, all times are 2 hours ahead of the present time.
>
> It looks like ...
>
> 1. ... either the Amiga system time should be set to UTC, but in this
> case all Amiga applications would work with UTC (which is not
> desired) or that ...
>
> 2. NetBSD TZ should be set to UTC (not to Luxembourg).
>
> What is the correct way to do it?
The correct way to do it would be to have the system clock run in UTC,
and have both OSes translate it to local time when displaying times.
Unfortunately, native AmigaOS doesn't do this (but: see the "unixclock"
program on AmiNET, which patches it to do this!)
However, if you want to run your battery clock at local time, you can tell
NetBSD to translate between the battery clock timezone and UTC using the
RTCOFFSET kernel option. Read man 4 options for the details.
[Note that you'll have to rebuild, or patch, your kernel twice a year if
you do this, to adopt to daylight savings time!]
Btw: 2. above would not work at all... the NetBSD system clock is always UTC.
What does change with setenv TZ is the way this internal time is displayed..
and every user on your system can have a different setting, even at the same
time. The /etc/localtime variable just sets the _default_ used, when TZ is
not set.
Regards,
Ignatios Souvatzis
Home |
Main Index |
Thread Index |
Old Index