Skip to content
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

The toolbox should use the same time zone as the host #70

Closed
refi64 opened this issue Mar 3, 2019 · 4 comments
Closed

The toolbox should use the same time zone as the host #70

refi64 opened this issue Mar 3, 2019 · 4 comments

Comments

@refi64
Copy link

refi64 commented Mar 3, 2019

I spent a good hour trying to debug my C program not displaying the time correctly before I realized it worked from the host system 😅

Currently, the time zone inside the toolbox is always set to UTC, regardless of the host time. (You can see this with a file /etc/localtime.) I'm guessing the fix would be to bind the host's /etc/localtime into the container?

@debarshiray
Copy link
Member

This is similar to the /etc/resolv.conf problem that we have.

Bind mounting /etc/localtime will work as long as the system's timezone doesn't change. If it does, then the bind mount won't get updated because it will be considered a separate inode. This wouldn't have been a problem if we could bind mount an entire directory.

Flatpak solves this by adding another level of redirection into a separate directory which is kept updated by a helper process.

@juhp
Copy link
Contributor

juhp commented Mar 6, 2019

Mounting /etc/localtime seems good enough for now?

@debarshiray
Copy link
Member

There's some Podman work going on in containers/podman#2744 that will let us solve this properly. I think this will be solved in the short-term.

@debarshiray
Copy link
Member

There's a work-in-progress branch in #93

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants