Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.misc > #12524
| From | William Unruh <unruh@invalid.ca> |
|---|---|
| Newsgroups | comp.os.linux.misc |
| Subject | Re: time problem |
| Date | 2014-10-27 13:54 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <m2liqj$7ls$1@dont-email.me> (permalink) |
| References | (4 earlier) <m2hpu0$qqt$1@reader1.panix.com> <m2i18n$ems$1@dont-email.me> <m2i6qd$nta$1@reader1.panix.com> <m2j4r5$n7b$1@dont-email.me> <m2ki28$q6b$1@reader1.panix.com> |
On 2014-10-27, JohnF <john@please.see.sig.for.email.com> wrote: > Rich <rich@example.invalid> wrote: >> JohnF <john@please.see.sig.for.email.com> wrote: >>> Rich <rich@example.invalid> wrote: >>> > JohnF <john@please.see.sig.for.email.com> wrote: >>> >> I've been having pretty much the same problem with slackware 14.1, >>> >> and am not running windows in any way, shape, or form on this box. >>> >> Every couple of days, some app seems to reset the hwclock to UTC. >>> >> But date show blah-blah EDT 2014, and there's no... >>> >> diff /etc/localtime /usr/share/zoneinfo/US/Eastern >>> >> ...differences. I set the date, clock -w it, and it >> >>> > Which "it"? Output from 'date' or the HWclock contents? >> >>> Thanks for followup and info, Rich. "It" is from 'date'. Now that, >>> thanks to your remarks, I'm researching it (the problem) better, I >>> realize that 'date' isn't sufficient info. >> >>> >> remains edt for a few days, then suddenly I notice it's utc. >>> > Which "it"? Output from 'date' or the HWclock contents? >> >>> As above, 'date'. >> >> That is quite strange. Provided you've got /etc/localtime set to your >> correct TZ file (and your "diff" line indicates you do (although "cmp" >> is the better choice than diff on binary files) then the output from >> date should always show as local time. Now, the actual value "with a >> EDT/EST suffix" may be incorrect, but that is different than date >> outputting a string saying "UTC" (which is what your statement means >> when I read it). > > Thanks again, Rich. cmp, as expected, also shows no differences. > date has an EDT suffix, unless run as date --utc as shown below, > or unless (for an experiment) I run timeconfig and change localtime > to GMT, in which case suffixes are GMT. Right now, as I write this, > timeconfig has localtime set to EDT, /etc/hardwareclock has UTC, > box was booted that way, and outputs are... > date Sun Oct 26 23:29:35 EDT 2014 > date --utc Mon Oct 27 03:30:03 UTC 2014 > hwclock -r Sun 26 Oct 2014 11:30:31 PM EDT -0.859741 seconds > hwclock -r --utc Sun 26 Oct 2014 11:31:12 PM EDT -0.359708 seconds > hwclock -r --localtime Mon 27 Oct 2014 03:31:45 AM EDT -0.312837 seconds I do not know what the time was from your wristwatch but I assume it was 3:30 AM This says that you re 4 hrs slow of UTC, and the hardware clock (rtc) is set to localtime, > Seems to be a hwclock glitch (I don't suppose it's relevant to > my particular problem) that suffixes are always EDT, whereas > date has edt time and EDT suffix, but date --utc has utc time and > UTC suffix, which is what I'd expect. But hwclock -r --localtime> shows correct utc numerical value, but followed by an EDT suffix. The hardware clock has no suffixes. It is the hwclock program that provices that. Your rtc is on localtime, and when you tell the program to interpret the time as "localtime" it does so correctly. If you tell it to interpret it as utc, (which is does by default) reads teh rtc, translates that time to localtime and gives something 4 hrs off. Note tht the meaning of --utc is different for the date command and for the hwclock command. For the date command it means-- Do not translate the system time read from the system (the system clock is ALWAYS in utc) For the hwclock command it means-- the rtc's time is stored in utc. Ie, it is NOT a glitch. > >> The difference is: >> o Date outputs a time string, suffixing EST/EDT, and the time string is >> correct for current EST/EDT. > Yes, this is what's happening right now, as illustrated above, and ... > >> o Date outputs a time string, suffixing EST/EDT, and the output string >> is _incorrect_ for current EST/EDT, but would be a correct UTC time >> string. > ...Yes, this is what happens when date goes screwy: suffix remains EDT, Nothing screwy. Your hardware clock is stored in localtime. But sometimes you tell it to pretend that time is utc and sometimes localtime. > > Yeah, during install I just followed what seemed to be their > recommendation. And never had any problems with previous > slackware releases (though I jumped from 12.2 to 14.1, so > can't comment on the intermediate ones). So never gave it > much thought. Somewhere you told it that the rtc was in localtime. > > Thanks for the additional info. I'd actually looked at man hwclock, > but got that -r --localtime versus --utc backwards. I'd just expected > --utc to display UTC, but it's apparently --localtime which does that. No. Those say NOTHING about the display. They tell the program how to interpret the time read from the rtc. It always displays that time translated by /etc/localtime. > I didn't read it carefully enough the first time to realize my > expectations were wrong. So my preceding remarks that hwclock -r > was showing edt were based on incorrectly trying hwclock -r --utc. You still did not read it carefully.
Back to comp.os.linux.misc | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
time problem "Bill Cunningham" <nospam@nspam.invalid> - 2014-10-25 18:24 -0400
Re: time problem Grant <omg@grrr.id.au> - 2014-10-26 11:02 +1100
Re: time problem "Bill Cunningham" <nospam@nspam.invalid> - 2014-10-25 20:30 -0400
Re: time problem Baho Utot <baho-utot@columbus.rr.com> - 2014-10-25 20:06 -0400
Re: time problem philo <philo@privacy.net> - 2014-10-25 19:53 -0500
Re: time problem "Bill Cunningham" <nospam@nspam.invalid> - 2014-10-25 21:02 -0400
Re: time problem Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us> - 2014-10-25 18:20 -0700
Re: time problem JohnF <john@please.see.sig.for.email.com> - 2014-10-26 03:31 +0000
Re: time problem Rich <rich@example.invalid> - 2014-10-26 05:36 +0000
Re: time problem JohnF <john@please.see.sig.for.email.com> - 2014-10-26 07:11 +0000
Re: time problem Rich <rich@example.invalid> - 2014-10-26 15:43 +0000
Re: time problem JohnF <john@please.see.sig.for.email.com> - 2014-10-27 04:35 +0000
Re: time problem Rich <rich@example.invalid> - 2014-10-27 10:22 +0000
Re: time problem JohnF <john@please.see.sig.for.email.com> - 2014-10-27 12:03 +0000
Re: time problem Rich <rich@example.invalid> - 2014-10-27 12:21 +0000
Re: time problem William Unruh <unruh@invalid.ca> - 2014-10-27 13:54 +0000
Re: time problem JohnF <john@please.see.sig.for.email.com> - 2014-10-27 05:01 +0000
Re: time problem Rich <rich@example.invalid> - 2014-10-27 10:23 +0000
Re: time problem JohnF <john@please.see.sig.for.email.com> - 2014-10-27 12:11 +0000
Re: time problem Rich <rich@example.invalid> - 2014-10-27 12:30 +0000
Re: time problem William Unruh <unruh@invalid.ca> - 2014-10-27 13:58 +0000
Re: time problem Rich <rich@example.invalid> - 2014-10-27 18:04 +0000
Re: time problem William Unruh <unruh@invalid.ca> - 2014-10-26 16:13 +0000
Re: time problem Chick Tower <c.tower@deadspam.com> - 2014-10-31 03:30 +0000
Re: time problem William Unruh <unruh@invalid.ca> - 2014-10-26 16:02 +0000
Re: time problem Andreas Kohlbach <oct14.5.ankman@spamgourmet.com> - 2014-10-26 17:48 -0400
Re: time problem William Unruh <unruh@invalid.ca> - 2014-10-26 21:58 +0000
Re: time problem "Nuno J. Silva (aka njsg)" <njsg@invalid.invalid> - 2014-10-27 08:47 +0000
Re: time problem Andreas Kohlbach <oct14.5.ankman@spamgourmet.com> - 2014-10-27 17:20 -0400
Re: time problem JohnF <john@please.see.sig.for.email.com> - 2014-10-27 04:45 +0000
Re: time problem "Bill Cunningham" <nospam@nspam.invalid> - 2014-10-25 21:08 -0400
Re: time problem philo <philo@privacy.net> - 2014-10-26 07:15 -0500
Re: time problem Balwinder S Dheeman <bdheeman.SANSPAM@outlook.com> - 2014-10-26 14:08 +0530
Re: time problem Charlie Gibbs <cgibbs@kltpzyxm.invalid> - 2014-10-27 03:15 +0000
Re: time problem William Unruh <unruh@invalid.ca> - 2014-10-26 15:53 +0000
Re: time problem James Moe <jimoeDESPAM@sohnen-moe.com> - 2014-10-26 14:01 -0700
Re: time problem Michael Baeuerle <michael.baeuerle@stz-e.de> - 2014-10-27 07:59 +0000
Re: time problem Marc Haber <mh+usenetspam1118@zugschl.us> - 2014-10-27 13:31 +0100
"iburst" option of ntpd (was: time problem) Michael Baeuerle <michael.baeuerle@stz-e.de> - 2014-10-28 08:23 +0000
Re: "iburst" option of ntpd (was: time problem) Marc Haber <mh+usenetspam1118@zugschl.us> - 2014-10-28 10:14 +0100
Re: "iburst" option of ntpd (was: time problem) William Unruh <unruh@invalid.ca> - 2014-10-28 21:10 +0000
Re: "iburst" option of ntpd Chris Davies <chris-usenet@roaima.co.uk> - 2014-10-28 14:24 +0000
csiph-web