You are not logged in.
Does /etc/localtime link to the correct time zone?
any idea why my /etc/localtime is a binary file and it wasn't linked to any file /
-- mod note: split from https://bbs.archlinux.org/viewtopic.php?id=193537 - Trilby --
Last edited by Trilby (2015-02-13 15:37:40)
Offline
gbcbooks, please don't try to hijack someone else's thread. That is a completely unrelated issue - start your own thread if you'd like.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Is your RTC set to UTC or local time?
Did you set the TZ using timedatectl or in some other fashion?
Are you using timesyncd or ntpd?
Offline
circleface wrote:Does /etc/localtime link to the correct time zone?
any idea why my /etc/localtime is a binary file and it wasn't linked to any file /
This was true of mine, too. Yet I remember setting the sym link up originally. I moved the old one to localtime.bkup and recreated the symbolic link.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Er ... okay. If the hijack must continue, I'll split it off myself.
If I found a binary /etc/localtime, I'd investigate that file to try to see where it comes from. What is the output of `file /etc/localtime` (or file /etc/localtime.back or whatever it was moved to)? If it's ELF, what is the output of objdump? If not, what is the output of `xxd /etc/localtime | head -1` (or a similar hexdump of the first several bytes)?
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Although I cannot do anymore testing, I can say that I had the same problem. I set the symlink when installing, but sometime and somehow after that, the actual binary timezone file the link went to got copied over the symlink. So, it appeared to continue to work since it was still the proper timezone file from /usr/share/zoneinfo. Unfortunately I just built a new computer and no longer have that old installation, but I can at least say it is a real problem that seems to affect some people, even if I don't know how.
Offline
If this is just the target of the link overwriting the link, I'd wonder if the 'victims' of this all have restored from backups and either backed-up or restored improperly.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I know I personally never restored any backup, but since I also don't know when it changed, it's hard to pin down any specific action that caused it for me.
Offline
If it sheds any light, here's the systemd page on /etc/localtime and /etc/timezone.
On my system, no packages owns /etc/localtime, and /etc/timezone doesn't exist.
Perhaps those with the issue (or had the issue) could check whether a package accidentally 'owned' /etc/localtime, maybe an AUR package?
Last edited by pypi (2015-02-14 19:29:49)
Offline
I'm afraid I deleted it. If other people had not reported the same thing, I would have kept it and tried to investigate. Since it did not seem to be an unknown problem, I just removed it and replaced it with a link. I also have an /etc/localtime.bkup which was almost certainly not created manually. That is dated 2014-03-27 and is a binary. At least, less certainly thinks so.
$ file /etc/localtime.bkup
/etc/localtime.bkup: timezone data, version 2, 7 gmt time flags, 7 std time flags, no leap seconds, 242 transition times, 7 abbreviation charsNo package owns /etc/localtime.
Although I have restored from backup in the past, that was prior to the switch to systemd and I would have definitely done so in a way which restored links etc. correctly. (I used rsync.)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Per the wiki, /etc/localtime should be a symlink to a timezone you specified. If restoring a backup resolved the symlink, it's just the file you specified. Example:
% file /etc/localtime
/etc/localtime: symbolic link to /usr/share/zoneinfo/US/CentralSince timezones change, you should delete the file and restore the symlink to stay current.
Last edited by graysky (2015-02-15 17:39:01)
Offline
As I say, restoring certainly can't explain the binary in my case. But I already switched it back to a symlink.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
cfr, maybe you made a hard link ("ln") instead of a soft link ("ln -s")? That would explain your file output from the backup file.
Offline
cfr, maybe you made a hard link ("ln") instead of a soft link ("ln -s")? That would explain your file output from the backup file.
It is impossible to say for sure that I didn't make a mistake. However, I am generally paranoid about these things and it would be very unusual for me to make a symbolic link and then not check it using ls -l. But, as I say, I obviously cannot say for certain that I didn't just screw it up.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
It is simply bad usability of the ln command—its default behavior, creating a hard link, is usually not what users want. It's very easy to forget the "-s" switch.
Offline