I am running debian. Sometime in the past month, when I received a
kernel upgrade and also a tzdata upgrade, I noticed that the time was wrong on my system.
/etc/localtime -> pointed as shortcut to correct timezone
/etc/timezone -> contained the correct timezone
This is happening on every debian/devuan/raspbian system that I have,
and it started happening sometime during the past month or six weeks
after I received a kernel/tzdata update.
I thought the time zone was saved in the two above places in /etc. Is there some other place that tzdata is reading from that I need to look
at so that, in future, whenever tzdata gets updated I don't have to remember to go back and manually fix the time zone each time?
/etc/localtime -> pointed as shortcut to correct timezone
/etc/timezone -> contained the correct timezone
This might depend on if you're using systemd or not. In my case (Archlinux), I
have '/etc/localtime' which is symlinked to the correct timezone in '/usr/share/zoneinfo'. I don't have '/etc/timezone', and I use ntpd to keep my
time synced.
Seeing as how you're using Debian and Devuan (one can only assume here that on
has systemd and the other does not, since you didn't specify), you may want to
check to see if 'ntpd' is installed and running properly:
This is happening on every debian/devuan/raspbian system that I have, and it started happening sometime during the past month or six weeks after I received a kernel/tzdata update.
Does tzdata actually do anything, though? Pretty sure it simply just provides the time zone information needed for all other applications or runtimes in the
operating system to print local time correctly. I can't imagine tzdata is to blame, here.. unless the Debian maintainers completely jacked that package up,
and for Debian variants only.
When you type 'sudo hwclock' what do you see? Is it displaying the correct timezone offset? And does it match your results for the 'date' command?
I thought the time zone was saved in the two above places in /etc. Is there some other place that tzdata is reading from that I need to look at so that, in future, whenever tzdata gets updated I don't have to remember to go back and manually fix the time zone each time?
Those are probably the two most common places, but might vary slightly between
distros. I think tzdata is what is read (by other applications), and doesn't d
any reading of anything on it's own (but I could be wrong). I can't imagine this is tzdata's fault, though, or it would be all over the Linux interwebz since it's a pretty important package, and not just specific to you.
If you don't have some kind of application or service setup to sync and retain
your time and timezone information, I recommend using one.
/etc/localtime is symlinked to the correct timezone until a tzdata
update is received, then it resets it to "Indianapolis."
Yes, it is correct right now. Not sure if it would be if I were to let tzdata run again.
I don't think it is "tzdata's fault," per se, but it very obviously on
my systems has "Indianapolis" saved *somewhere* other than the two
places I would know to look.... /etc/timezone and /etc/localtime... and
I need to find it and quash it. ;)
I have checked in /etc, /var, and a couple of other places for a config file but don't see one. Someone else suggested running grep on the contents of /etc and looking for "Indianapolis." I will try that if I
can figure out how to get grep to run on a whole directory?
Will ntpd use the hwclock time to determine this, or does it rely on /etc/localtime? If it uses the latter, I suspect it will be wrong, too. ;)
Sysop: | Eric Oulashin |
---|---|
Location: | Beaverton, Oregon, USA |
Users: | 106 |
Nodes: | 16 (0 / 16) |
Uptime: | 00:02:24 |
Calls: | 5,846 |
Files: | 8,496 |
D/L today: |
12 files (7,044K bytes) |
Messages: | 343,202 |