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

how to change vm time zone #2061

Closed
du2016 opened this issue Oct 13, 2017 · 9 comments
Closed

how to change vm time zone #2061

du2016 opened this issue Oct 13, 2017 · 9 comments
Labels
kind/support Categorizes issue or PR as a support question. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@du2016
Copy link

du2016 commented Oct 13, 2017

how to change vm time zone,when the vm start,it set the same time to my local,but not my local timezone

@aaron-prindle aaron-prindle added the kind/support Categorizes issue or PR as a support question. label Oct 19, 2017
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 17, 2018
@du2016 du2016 closed this as completed Jan 18, 2018
@alejandrodnm
Copy link

alejandrodnm commented Jan 30, 2019

I'm having the same problem, it's happening with the vmware driver. The timezone it's set to UTC but the time is my localtime, @du2016 did you manage to fix it? When using virtualbox it works fine.

I changed the date manually but that's more like a workaround than a solution.

I also reported the issue here machine-drivers/docker-machine-driver-vmware#17

@du2016
Copy link
Author

du2016 commented Jan 31, 2019

@alejandrodnm i have change source code: copy timezone file to localtime before vm start, then build myself

@efengx
Copy link

efengx commented Apr 4, 2019

I also encountered the same problem, if using minikube in different countries how to ensure that the hyperkit uses the specified time zone

@alejandrodnm
Copy link

alejandrodnm commented Apr 4, 2019

I ended up with this, that I found in some other issue

$ alias minikube-date
minikube-date='DSTR=$(date -u); minikube ssh "sudo date --set=\"$DSTR\""'

@balopat
Copy link
Contributor

balopat commented Jun 1, 2019

I just ran into this as well on MacOS + hyperkit - this can cause issues with docker builds against minikube's docker daemon, e.g. from skaffold:
"E: Release file for http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease is not valid yet (invalid for another 1h 54min 32s). Updates for this repository will not be applied."

I can confirm that @alejandrodnm's fix works!

@balopat balopat reopened this Jun 1, 2019
@tstromberg
Copy link
Contributor

tstromberg commented Jun 1, 2019

@balopat I believe your issue is actually #4264 - not timezone related, but system clock related (fixed at . head)

@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jul 1, 2019
@tstromberg
Copy link
Contributor

The VM time zone is UTC. If you really really want to change it to your local time zone, run this on your host:

mkdir -p ~/.minikube/files/etc
cp /etc/localtime  ~/.minikube/files/etc

Every subsequent run of minikube start will override the timezone with what you have specified in ~/.config/minikube/files/etc/localtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

8 participants