Boot2docker: VM / wrong date time

Created on 10 Jan 2014  路  12Comments  路  Source: boot2docker/boot2docker

Host System is OSX:
OSX (Host): Fr 10 Jan 2014 04:42:26 CET
VM (Tiny Core Linux): Fri Jan 10 04:41:13 UTC 2014

to fix this you need to set this FLAG for virtual box:
--rtcuseutc on // This option lets the real-time clock (RTC) operate in UTC time

Most helpful comment

Hi @erikprice, I can confirm that #661 does _not_ fix this for me. Current time on OS X 23 Jan, 9:08 AM. In the container 23 Jan, 6:22 AM. Running with release 1.4.1.

The workaround, as provided by Eric Silverberg, is to run the following command periodically from OS X:

/usr/local/bin/boot2docker ssh sudo ntpclient -s -h pool.ntp.org

All 12 comments

Can you open a PR? This way we'll know you're the author of the fix :)
Thanks!

How do I apply this update to my boot2docker install?

so long as you're using the boot2docker tool to create the virtual machine, it already has been applied - the code is in the boot2docker-cli repository.

I followed the installation instructions from docker.io here just this week. So, I should have the latest if this was there in January. Yet all the time keeps saying it's two days in the past.

Ok, I figured out my problem when I sleep my mac then wake it up the next morning the boot2docker clock is not updating. When I bring down boot2docker then restart it works fine.

This is not fixed.

+1

It's still an issue. I've done a "boot2docker up" today and realized that date is "Tue Dec 9 17:59:11 UTC 2014". But in reality it's 10th December 2014, 10:14AM.

@brdloush Does #661 fix this for you?

Hi @erikprice, I can confirm that #661 does _not_ fix this for me. Current time on OS X 23 Jan, 9:08 AM. In the container 23 Jan, 6:22 AM. Running with release 1.4.1.

The workaround, as provided by Eric Silverberg, is to run the following command periodically from OS X:

/usr/local/bin/boot2docker ssh sudo ntpclient -s -h pool.ntp.org

Same here @aral. In the meantime I've been using this convenience wrapper: https://github.com/beechnut/boot2docker-ntp

+1 to @aral, having the same issue and need to run

/usr/local/bin/boot2docker ssh sudo ntpclient -s -h pool.ntp.org

Same issue here, when I sleep my mac and wake it up the next morning the b2d clock does not update.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tianon picture tianon  路  8Comments

rcross picture rcross  路  6Comments

joshuahayes picture joshuahayes  路  14Comments

nguoianphu picture nguoianphu  路  4Comments

ovidiubuligan picture ovidiubuligan  路  7Comments