🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.linux.development.system
Article #16

Re: A whacky DATE bug in Linux - Problem gets crazier!

#16
From: Martin J. Maney
Date: Mon, 05 Oct 1998 00:00
23 lines
2700 bytes
[follow-ups trimmed - this never belonged in many of these groups,
folks, please try to post more appropriately AND ALWAYS SET FOLLOWUPS.
Read new.users, huh?]

In many groups Paul Taylor <birder@ozemail.com.au> wrote:
> "hwclock --utc" is incorrect.  My timezone is UTC+10; "date", "date -u" and
> "hwclock" show the expected times, but "hwclock --utc" shows the time as
> 10 hours ahead of local instead of 10 hours behind.  Presumably the program
> was written by someone in the USA who thought that UTC is always ahead of
> local time.

No, I think the operation is correct and your expectations are wrong. 
The meaning of the UTC option is different for the two commands.  In
the case of [hw]clock (I'm used to clock, and assume hwclock has the
same interface here), rather than meaning "report the (real, kernel
notion of) the current time as UTC" as clock -u does, the hwclock
option means "report the CMOS clock's time as local time _assuming_
that the CMOS clock is actually keeping UTC time".  There's no
(standard) way for hwclock to determine whether the CMOS clock is set
to UTC or local time - you have to tell it.

You don't want to use the UTC option with [hw]clock unless your CMOS
clock actually is set to UTC rather than local time.
Technical Details
Message-ID: <6vag6e$d6r$1@Jupiter.Mcs.Net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3601D4F7.247C8BC2@usq.edu.au> <3607ABBA.1952C377@uq.net.au> <36087C67.3313582C@usq.edu.au> <360E42BB.CF1DF123@uq.net.au> <907566662.768516518@news.frankfurt.netsurf.de> <36187FCD.774B379C@ozemail.com.au>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5392,12de531511895886
X-Google-Attributes: gidf5392,public
X-Google-Thread: 10c696,12de531511895886
X-Google-Attributes: gid10c696,public
X-Google-Thread: f9382,12de531511895886
X-Google-Attributes: gidf9382,public
X-Google-Thread: f9b51,12de531511895886
X-Google-Attributes: gidf9b51,public
X-Google-Thread: 100c5f,12de531511895886
X-Google-Attributes: gid100c5f,public
X-Google-Thread: faa64,12de531511895886
X-Google-Attributes: gidfaa64,public
X-Google-Thread: ff9be,12de531511895886
X-Google-Attributes: gidff9be,public
X-Google-Thread: 102983,12de531511895886
X-Google-Attributes: gid102983,public
From: maney@MCS.COM (Martin J. Maney)
Subject: Re: A whacky DATE bug in Linux - Problem gets crazier!
Date: 1998/10/05
Message-ID: <6vag6e$d6r$1@Jupiter.Mcs.Net>
X-Deja-AN: 397895988
References: <3601D4F7.247C8BC2@usq.edu.au> <3607ABBA.1952C377@uq.net.au> <36087C67.3313582C@usq.edu.au> <360E42BB.CF1DF123@uq.net.au> <907566662.768516518@news.frankfurt.netsurf.de> <36187FCD.774B379C@ozemail.com.au>
Followup-To: comp.os.linux.setup,comp.os.linux.questions,aus.computers.linux
Organization: MCSNet, Chicagoland's finest Internet Service Provider 312-803-6271
Newsgroups: comp.os.linux.development.system,comp.os.linux.development.apps,comp.os.linux.setup,alt.linux,alt.os.linux,comp.os.linux,comp.os.linux.questions,aus.computers.linux