[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Weird hw/system time issue..



Hmmm... Indeed!

Looking at the websites that Bob suggested, I'm reminded that there is yet one more variable that could be affecting your setup:

The file, /etc/localtime, is a copy of one of the files in /usr/share/zoneinfo.  These are binary files that encode information about a timezone and all its historical permutations (such as when Congress mandates a change in the days of switching to Daylight time...)

/etc/localtime (or, in the case that $TZ is set, one of the files in the zoneinfo library) provides the magical incantation that the date printing libraries use to convert "system" UTC time into "user readable" local time representations.

If your /etc/localtime file somehow got confused (removed? misconfigured?) that could explain what you were seeing, and why setting the $TZ variable made the symptoms go away...

I have no idea what you need to do to re-callibrate your /etc/localtime file.  Presumably "dpkg-reconfigure <some package>" but which package?

Indeed... Hmmm!

Rick

On Jun 13, 2014, at 2:03 PM, LVDave wrote:

> hmmm then that is really weird, as I put an "export TZ="PST8PDT" in the /etc/profile and once the machine rebooted, the problem disappeared. I do have ntp on the system but its not running.. When I originally posted I had been running with localtime on the hwclock/bios. but read that normally one sets UTC in the hwclock, so I changed it.. Bob: I ran dpkg-reconfigure tzdata, and it was already showing "America/Los_Angeles".. my /etc/timezone also shows "America/Los_Angeles".. Also thanks for the reading list.. I hope to learn something more about Linux timekeeping..  
> 
> 
> On Fri, Jun 13, 2014 at 9:06 AM, Rick Thomas <rbthomas@pobox.com> wrote:
> Hi Dave,
> 
> Actually, the $TZ shell variable being unset is normal for Debian.  If $TZ is unset, the system uses /etc/timezone, which is set with a reasonable value.  Most people never bother to set TZ and never notice the difference.
> 
> If you want to set TZ, do it in your ~/.bashrc   ... though it should not be necessary.
> 
> Looking at your outputs, I see nothing strange.  Your hardware clock is set to UTC, which is what the OS is configured for.  Your local timezone is set for USA Pacific Daylight time, which is 7 hours behind UTC.
> 
> However, This does not agree with your original posting, so I assume you have switched to having the hardware clock set to UTC?
> 
> Are you running either ntp or ntpdate on this computer at the present time?
> 
> Can you
> 
> Rick
> 
> 
> On Jun 13, 2014, at 7:35 AM, LVDave wrote:
> 
> > Thanks for replying!!!
> >
> > Here's the items...
> >
> > ********* /etc/adjtime *******************
> >
> > 0.000000 1402669134 0.000000
> > 1402669134
> > UTC
> >
> > ********* /etc/default/rcS ***************
> > #
> > # /etc/default/rcS
> > #
> > # Default settings for the scripts in /etc/rcS.d/
> > #
> > # For information about these variables see the rcS(5) manual page.
> > #
> > # This file belongs to the "initscripts" package.
> >
> > # delete files in /tmp during boot older than x days.
> > # '0' means always, -1 or 'infinite' disables the feature
> > #TMPTIME=0
> >
> > # spawn sulogin during boot, continue normal boot if not used in 30 seconds
> > #SULOGIN=no
> >
> > # do not allow users to log in until the boot has completed
> > #DELAYLOGIN=no
> >
> > # be more verbose during the boot process
> > #VERBOSE=no
> >
> > # automatically repair filesystems with inconsistencies during boot
> > #FSCKFIX=no
> >
> > ******** /etc/timezone ********************
> >
> > America/Los_Angeles
> >
> >
> > ******** echo $TZ **********************
> >
> > Echo $TZ is blank....
> >
> > ******** /sbin/hwclock --debug --show ******
> >
> > hwclock from util-linux 2.20.1
> > Using /dev interface to clock.
> > Last drift adjustment done at 1402669134 seconds after 1969
> > Last calibration done at 1402669134 seconds after 1969
> > Hardware clock is on UTC time
> > Assuming hardware clock is kept in UTC time.
> > Waiting for clock tick...
> > ...got clock tick
> > Time read from Hardware Clock: 2014/06/13 14:28:48
> > Hw clock time : 2014/06/13 14:28:48 = 1402669728 seconds since 1969
> > Fri 13 Jun 2014 02:28:48 PM UTC  -0.656908 seconds
> >
> >
> > The TZ variable being blank seems to be a smoking gun.. Not sure why or how it got unset.. How would I address getting that fixed? I've not had a lot of experience messing with Linux timekeeping issues..
> >
> > LVdave
> >
> >
> >
> > On Fri, Jun 13, 2014 at 2:25 AM, Rick Thomas <rbthomas@pobox.com> wrote:
> >
> > On Jun 12, 2014, at 2:17 PM, LVDave wrote:
> >
> > > I'm running Debian Jessie with KDE on a laptop, and the install has developed a very annoying problem.. I have the bios/hw clock set on localtime (American/Pacific time). Every time I start the machine up, the system clock changes to UTC. I have to then go to the taskbar "set date/time" and run the time back to local time. Also, the tooltip that comes up when you mouse over the taskbar clock shows the same time for "Los Angeles" and UTC. I've run hwclock --localtime to notify the os that the hw clock is on localtime.. I've also tried putting the hw clock on UTC and running hwclock --utc.. Then after each reboot, I see in the clock tooltip being UTC for both localtime and UTC.. When I first built this system, about 3 months ago, I didnt have this problem, it has appeared fairly recently, and I've just been living with it, but its getting awfully annoying... Further google-foo showed that /etc/adjclock had to have
> > > LOCAL in the third line, which it does.. Doesn't seem to make any difference.. The KDE "Adjust Date/Time" shows TZ as "LosAngeles/Pacific Time", which is what it should be. I've tried installed ntpdate and tried setting "Set Date/Time automatically" but it quickly sets the system time to UTC..  Am at my wits end.. Been using Linux for a LONG time and never had a weird issue like this...
> > >
> > > Dave Frandin
> > > lvdave*AT*GEEmale(DOT)com
> >
> > Hi Dave,
> >
> > Please send us the output of this set of commands
> >
> > cat /etc/adjtime
> > cat /etc/default/rcS
> > cat /etc/timezone
> > echo $TZ
> > sudo /sbin/hwclock --debug --show
> >
> >
> > Thanks!
> >
> > Rick
> >
> 
> 


Reply to: