1

When DST started a few weeks ago, my laptop's system time did not switch accordingly. (IOW, its time is 1-hour behind.)

It is the only one of my Debian-based systems that is disregarding DST. My desktops at home and at work, in contrast, display the correct DST time, without any help from me. I have configured all three machines pretty much the same way. None of the few differences in configurations I can think has anything to do with the system time. I certainly don't recall ever performing any DST-related configuration on my laptop.

How can I troubleshoot this problem?


FWIW,

% cat /etc/timezone
America/New_York

UPDATE: Apologies for the delay in posting this update. Below are the outputs of the commands mentioned in the comments, all run as root on two separate systems, and more-or-less simultaneously (i.e. all the commands shown below ran in a time window shorter than ~1s).

 | laptop                                             | desktop                                            |
 |----------------------------------------------------+----------------------------------------------------|
 | # cat /etc/adjtime                                 | # cat /etc/adjtime                                 |
 | -0.083945 1458577059 0.000000                      | -26.119278 1454953275 0.000000                     |
 | 1458577059                                         | 1454953275                                         |
 | LOCAL                                              | LOCAL                                              |
 |                                                    |                                                    |
 | # TZ=GMT hwclock --show                            | # TZ=GMT hwclock --show                            |
 | Fri 08 Apr 2016 11:26:37 AM GMT  -0.078549 seconds | Fri 08 Apr 2016 11:23:42 AM GMT  -0.031939 seconds |
 |                                                    |                                                    |
 | # TZ=GMT date                                      | # TZ=GMT date                                      |
 | Fri Apr  8 15:26:23 GMT 2016                       | Fri Apr  8 16:23:34 GMT 2016                       |
 |                                                    |                                                    |
 | # date                                             | # date                                             |
 | Fri Apr  8 11:26:23 EDT 2016                       | Fri Apr  8 12:23:34 EDT 2016                       |
 |                                                    |                                                    |
 | # date --utc                                       | # date --utc                                       |
 | Fri Apr  8 15:26:23 UTC 2016                       | Fri Apr  8 16:23:34 UTC 2016                       |

Both systems are similarly configured, though it looks like they differ in some time-related configuration.

I am surprised that the differences between the two systems are not within 1 or 2 seconds of exactly 1 hour (or 0 hours). For example, the outputs for TZ=GMT hwclock --show differ by around 3 minutes. I thought that the machines would be setting their clocks according to some centralized time server somewhere, but this does not jive with that 3-minute discrepancy.

kjo
  • 15,339
  • 25
  • 73
  • 114

1 Answers1

2

I think the reason you're seeing this discrepancy is that your BIOS clock is set to local time and not to UTC, and something has missed adjusting it for the winter/summer time change. (Dual booting could have this effect, as could the system being switched off across the time change.)

My recommendation would be to run the system on UTC and have the OS adjust for your local timezone (including the winter/summer change).

Since you are already in the correct timezone you don't need to run tzselect. Rather, I believe you can fix the underlying hardware time simply by deleting (or renaming) /etc/adjtime and immediately rebooting. Then use ntpdate -u us.pool.ntp.org to set the time correctly, and reboot once more.


Incidentally, your desktop seems to be loosing/gaining 26 seconds every day. That seems very high. You might want to zero those first numbers and reboot it to see if your long term stability improves.

Chris Davies
  • 116,213
  • 16
  • 160
  • 287