Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Dec 2002 16:10:16 +1100
From:      Mark.Andrews@isc.org
To:        Evren Yurtesen <eyurtese@turkuamk.fi>
Cc:        freebsd-stable@FreeBSD.ORG
Subject:   Re: (2) timezone bug? 
Message-ID:  <200212110510.gBB5AGtB057163@drugs.dv.isc.org>
In-Reply-To: Your message of "Wed, 11 Dec 2002 06:37:23 %2B0200." <Pine.A41.4.10.10212110623490.42912-100000@bessel.tekniikka.turkuamk.fi> 

next in thread | previous in thread | raw e-mail | index | archive | help

> Well yes it is creating and erasing that file but the man page of
> adjkerntz says
> 
> -------------------------
> If the file /etc/wall_cmos_clock exists, it means that CMOS clock keeps local
> time (MS-DOS and MS-Windows compatible mode).
> -------------------------
> 
> What I understand is if the file is there the system shouldnt add 2 hours
> to the CMOS clock and if it is not there then it should add 2 hours since
> I am at GMT+2. Is this right?
> But in every instance it added 2 hours to the clock. 

	The system will subtract two hours from the cmos clock and use
	that for UTC however the kernel needs to be told what the adjustment
	is and that is adjkerntz job.

> Also even when I delete or recreate the wall_cmos_clock file still date
> gives same result.

	Yes because the kernel has not yet been updated.  Its concept of
	UTC has not changed.

> If I delete the localtime file then the date command shows 2 hours earlier
> time.

	Date returns UTC if it doesn't know what the local offset is
	(date -u).

> After deleting or creating wall_cmos_clock file should I send HUP signal
> to adjkerntz? or?

	Kill adjkerntz then re-run it with "adjkerntz -i" and then
	set the date or just shutdown, adjust the BIOS clock to wall
	clock time or UTC to be consistant with /etc/wall_cmos_clock's
	presence then reboot.

	Mark
> 
> Evren
> 
> On Wed, 11 Dec 2002 Mark.Andrews@isc.org wrote:
> 
> > 
> > > OK I will read the manuals but the tzsetup asks me
> > > 
> > > "Is this machine's CMOS clock set to UTC?  If it is set to local time, or
> > > you don't know, please choose NO here!"
> > > 
> > > I wonder why it asks this then? Selecting yes or no doesnt effect
> > > anything?
> > 
> > 	Are you sure?  Selecting No will create /etc/wall_cmos_clock
> > 	and selecting Yes will remove /etc/wall_cmos_clock.
> > 
> > 	Mark
> > > Evren
> > > 
> > > 
> > > On Wed, 11 Dec 2002 Mark.Andrews@isc.org wrote:
> > > 
> > > > 
> > > > > and why do I need to tell that?
> > > > 
> > > > 	Because you want to have the current time in both Windows and
> > > > 	FreeBSD and Windows assumes that the CMOS clock is a wall clock
> .
> > > > 
> > > > > cant the tzsetup program set it automatically?
> > > > 
> > > > 	That's not tzsetup purpose.  It assumes the kernel is returning
> > > > 	UTC and arranges for local time to be returned based on that.
> > > > 
> > > > 	Teaching the kernel that the cmos clock is running with wall cl
> ock
> > > > 	time is adjkerntz purpose.
> > > > 
> > > > > Is it enough if I only create this file?
> > > > 
> > > > 	No.  You will also need to inform the kernel and reset the cmos
> > > > 	clock to wall clock time.  I suggest that you read the manual
> > > > 	pages for tzsetup and adjkerntz.
> > > > 
> > > > 	Also you need to take care the first time you re-boot into wind
> ows
> > > > 	after a daylight savings switch.
> > > > 
> > > > 	Mark
> > > > 
> > > > > Evren
> > > > > 
> > > > > On Wed, 11 Dec 2002 Mark.Andrews@isc.org wrote:
> > > > > 
> > > > > > 
> > > > > > 	It sounds like you have not told the system that you are using
> > > > > > 	wall clock time and it defaults to using UTC.
> > > > > > 
> > > > > > 	/etc/wall_cmos_clock
> > > > > > 
> > > > > > 	Mark
> > > > > > 
> > > > > > > I wonder if this is a bug in the tzsetup system...
> > > > > > > I set my timezone and everything works fine although it says EEST
>  whe
> > > n I
> > > > > > > am used to see GMT+2.
> > > > > > > But the main problem is that when I set the timezone then 2 hours
>  are
> > > > > > > substracted from my bios clock after I use ntpdate and operating 
> syst
> > > em 
> > > > > > > shows correct time by adding 2 hours. Now this is not a big probl
> em i
> > > f my
> > > > > > > computer clock is wrong normally but I sometimes boot to windoze 
> and 
> > > it
> > > > > > > shows 2 hours early =) everytime I boot to FreeBSD and back to Wi
> ndoz
> > > e.
> > > > > > > 
> > > > > > > What do you say? this is a bug or? How do I prevent this from hap
> peni
> > > ng
> > > > > > > all the time?
> > > > > > > 
> > > > > > > Evren
> > > > > > > 
> > > > > > > 
> > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > > > > > > with "unsubscribe freebsd-stable" in the body of the message
> > > > > > --
> > > > > > Mark Andrews, Internet Software Consortium
> > > > > > 1 Seymour St., Dundas Valley, NSW 2117, Australia
> > > > > > PHONE: +61 2 9871 4742                 INTERNET: Mark.Andrews@isc.o
> rg
> > > > > > 
> > > > > 
> > > > > 
> > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > > > > with "unsubscribe freebsd-stable" in the body of the message
> > > > --
> > > > Mark Andrews, Internet Software Consortium
> > > > 1 Seymour St., Dundas Valley, NSW 2117, Australia
> > > > PHONE: +61 2 9871 4742                 INTERNET: Mark.Andrews@isc.org
> > > > 
> > > 
> > > 
> > > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > > with "unsubscribe freebsd-stable" in the body of the message
> > --
> > Mark Andrews, Internet Software Consortium
> > 1 Seymour St., Dundas Valley, NSW 2117, Australia
> > PHONE: +61 2 9871 4742                 INTERNET: Mark.Andrews@isc.org
> > 
> 
--
Mark Andrews, Internet Software Consortium
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: Mark.Andrews@isc.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200212110510.gBB5AGtB057163>