-
Notifications
You must be signed in to change notification settings - Fork 29
File /etc/localtime missing #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Did you mean
Regular setup: lima-alpine:~# apk add tzdata
(1/1) Installing tzdata (2022c-r0)
Executing busybox-1.35.0-r17.trigger
OK: 49 MiB in 81 packages
lima-alpine:~# setup-timezone -z UTC
lima-alpine:~# ls -l /etc/localtime
lrwxrwxrwx 1 root root 17 Oct 17 01:44 /etc/localtime -> /etc/zoneinfo/UTC
lima-alpine:~# cat /etc/localtime
TZif2UTCTZif2UTC
UTC0 But which command needs this; the default for |
I just realized that zoneinfo files are binary files, so we would actually need to copy it from the lima-alpine:~# hexdump -C /etc/localtime
00000000 54 5a 69 66 32 00 00 00 00 00 00 00 00 00 00 00 |TZif2...........|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000020 00 00 00 00 00 00 00 01 00 00 00 04 00 00 00 00 |................|
00000030 00 00 55 54 43 00 54 5a 69 66 32 00 00 00 00 00 |..UTC.TZif2.....|
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 |................|
00000060 00 04 00 00 00 00 00 00 55 54 43 00 0a 55 54 43 |........UTC..UTC|
00000070 30 0a |0.|
00000072 |
Good catch! I will make sure to adjust the workaround then.... (it was for apptainer) In the Fedora VM, it is a symlink: Your approach with adding lima-alpine-apptainer:~$ apptainer run docker://busybox
INFO: Using cached SIF image
INFO: fuse2fs not found, will not be able to mount EXT3 filesystems
Apptainer> ls -l /etc/localtime
-rw-r--r-- 1 nobody nobody 114 Oct 17 08:24 /etc/localtime
Apptainer> exit
lima-alpine-apptainer:~$ ls -l /etc/localtime
lrwxrwxrwx 1 root root 17 Oct 17 08:24 /etc/localtime -> /etc/zoneinfo/UTC |
I would not install all of But first I wanted to make sure we are talking about the right thing; and I want a comment explaining why we are doing this. |
You don't have to keep Here is what alpine-conf is actually doing:
|
I'm not sure why I wrote this, but tools are supposed to treat a missing zoneinfo database the same as if it was configured for UTC. So there wouldn't be a good reason to just copy the UTC data (unless we are dealing with a broken tool). The whole of |
Some runtimes expect
/etc/localtime
to be present...Maybe it can be created, to match the output of
date
?Something similar to this workaround:
echo UTC | sudo tee /etc/localtime
The text was updated successfully, but these errors were encountered: