dmesg: Invalid time in clock: check and reset the date

2008-10-10 Thread Richard Smith
Hi, I've just installed FreeBSD 7.0 Release along with Windows XP on my PC. I 
found that when I set the clock to the correct time&date, next time I boot into 
FreeBSD it changes and reports the wrong time&date. Both BIOS and Windows 
reports the time correctly.

dmesg shows the following message:
Invalid time in clock: check and reset the date!

Can't figure out what's wrong... any help will be appreciated.

regards


  

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: dmesg: Invalid time in clock: check and reset the date

2008-10-11 Thread Matthew Seaman

Richard Smith wrote:

Hi, I've just installed FreeBSD 7.0 Release along with Windows XP on my PC. I found 
that when I set the clock to the correct time&date, next time I boot into FreeBSD 
it changes and reports the wrong time&date. Both BIOS and Windows reports the time 
correctly.

dmesg shows the following message:
Invalid time in clock: check and reset the date!

Can't figure out what's wrong... any help will be appreciated.


Is the time out by an exact number of hours?[*]  Does the offset
correspond to your localities' timezone offset from UTC?

If so, then what is happening is this: Windows will only deal with
one timezone at a time, and it expects the system clock (and
consequently the CMOS clock on the motherboard) to be set to the
local wall-clock time.

Unix in comparison allows each process to be run in an arbitrary
timezone, simply by setting the TZ environment variable.  It
expects the system clock and the CMOS clock to be set to UTC, and
it calculates the local offset as required.

When you reboot the machine, the internal system clock is set from
the cmos clock, so one or the other OS will end up thinking local
wall-clock time is UTC or vice-versa.  Unless you have the happy 
fortune to be living in this Sceptered Isle (but only during the wintertime), or in certain parts of West Africa that's going to

cause problems.

If you need to dual-boot, FreeBSD provides a mechanism for allowing
the CMOS clock to be set to wallclock time.  You can toggle the
setting using /usr/sbin/tzsetup -- if there is a zero length file 
/etc/wall_cmos_clock then your system is running in compatability
mode.  Note: this file should not appear on a box that is dedicated
to running FreeBSD[+] -- the tzsetup default is the /wrong/ choice
in this case.

Cheers,

Matthew

[*] Assuming you don't live in Newfoundland or one of the other odd
places with timezones that have a 30 minute offset.

[+] or that only dual boots to *BSD or Linux or MacOS X or Solaris
etc.

--
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
 Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
 Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


RE: dmesg: Invalid time in clock: check and reset the date

2008-10-11 Thread Ted Mittelstaedt


> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Matthew Seaman
> Sent: Saturday, October 11, 2008 12:49 AM
> To: Richard Smith
> Cc: freebsd-questions@freebsd.org
> Subject: Re: dmesg: Invalid time in clock: check and reset the date
> 
> 
> Richard Smith wrote:
> > Hi, I've just installed FreeBSD 7.0 Release along with Windows 
> XP on my PC. I found that when I set the clock to the correct 
> time&date, next time I boot into FreeBSD it changes and reports 
> the wrong time&date. Both BIOS and Windows reports the time correctly.
> > 
> > dmesg shows the following message:
> > Invalid time in clock: check and reset the date!
> > 
> > Can't figure out what's wrong... any help will be appreciated.
> 
> Is the time out by an exact number of hours?[*]  Does the offset
> correspond to your localities' timezone offset from UTC?
> 
> If so, then what is happening is this: Windows will only deal with
> one timezone at a time, and it expects the system clock (and
> consequently the CMOS clock on the motherboard) to be set to the
> local wall-clock time.
> 
> Unix in comparison allows each process to be run in an arbitrary
> timezone, simply by setting the TZ environment variable.  It
> expects the system clock and the CMOS clock to be set to UTC, and
> it calculates the local offset as required.
> 
> When you reboot the machine, the internal system clock is set from
> the cmos clock, so one or the other OS will end up thinking local
> wall-clock time is UTC or vice-versa.  Unless you have the happy 
> fortune to be living in this Sceptered Isle (but only during the 
> wintertime), or in certain parts of West Africa that's going to
> cause problems.
> 
> If you need to dual-boot, FreeBSD provides a mechanism for allowing
> the CMOS clock to be set to wallclock time.  You can toggle the
> setting using /usr/sbin/tzsetup -- if there is a zero length file 
> /etc/wall_cmos_clock then your system is running in compatability
> mode.  Note: this file should not appear on a box that is dedicated
> to running FreeBSD[+] -- the tzsetup default is the /wrong/ choice
> in this case.
> 

No, it's not.

There is nothing wrong with running the CMOS clock on wall-clock
time even on a dedicated system.  You can do it any way you please.
Any real server should be synced by NTP in any case since the
internal RTC clock chip in a PC is not reliable or accurate.

Note that if you do run the CMOS clock on UTC that if your BIOS/CMOS
has a fancy auto-adjusting daylight savings time thingie in it, you
should disable that.

Ted
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"