From owner-freebsd-questions@FreeBSD.ORG Sat Oct 11 07:56:56 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A3AC1065687 for ; Sat, 11 Oct 2008 07:56:56 +0000 (UTC) (envelope-from tedm@toybox.placo.com) Received: from mail.freebsd-corp-net-guide.com (mail.freebsd-corp-net-guide.com [65.75.192.90]) by mx1.freebsd.org (Postfix) with ESMTP id 40F508FC1B for ; Sat, 11 Oct 2008 07:56:56 +0000 (UTC) (envelope-from tedm@toybox.placo.com) Received: from TEDSDSK (nat-rtr.freebsd-corp-net-guide.com [65.75.197.130]) by mail.freebsd-corp-net-guide.com (8.13.8/8.13.8) with SMTP id m9B7usJc061517; Sat, 11 Oct 2008 00:56:55 -0700 (PDT) (envelope-from tedm@toybox.placo.com) From: "Ted Mittelstaedt" To: "Matthew Seaman" , "Richard Smith" Date: Sat, 11 Oct 2008 00:57:45 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1933 In-Reply-To: <48F05A7C.7030404@infracaninophile.co.uk> Importance: Normal X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (mail.freebsd-corp-net-guide.com [65.75.192.90]); Sat, 11 Oct 2008 00:56:55 -0700 (PDT) Cc: freebsd-questions@freebsd.org Subject: RE: dmesg: Invalid time in clock: check and reset the date X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2008 07:56:56 -0000 > -----Original Message----- > From: owner-freebsd-questions@freebsd.org > [mailto:owner-freebsd-questions@freebsd.org]On 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