From 142cc4bef78cd553ecb08d7b11a8041efc90bef0 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 7 Apr 2013 15:04:38 -0700 Subject: [PATCH] rtcuseutc as sane default for VBox [GH-912] --- CHANGELOG.md | 1 + plugins/providers/virtualbox/action/sane_defaults.rb | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d94ea9821..105142d10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,7 @@ IMPROVEMENTS: - Invalid settings are now caught and shown in a user-friendly way. [GH-1484] - Detect PuTTY Link SSH client on Windows and show an error. [GH-1518] - `vagrant ssh` in Cygwin won't output DOS path file warnings. + - Add `--rtcuseutc on` as a sane default for VirtualBox. [GH-912] BUG FIXES: diff --git a/plugins/providers/virtualbox/action/sane_defaults.rb b/plugins/providers/virtualbox/action/sane_defaults.rb index f964941c1..fc3f66ead 100644 --- a/plugins/providers/virtualbox/action/sane_defaults.rb +++ b/plugins/providers/virtualbox/action/sane_defaults.rb @@ -25,6 +25,10 @@ module VagrantPlugins ] attempt_and_log(command, "Enabling the Host I/O cache on the SATA controller...") + # Use rtcuseutc so that the VM sees UTC time. + command = ["modifyvm", env[:machine].id, "--rtcuseutc", "on"] + attempt_and_log(command, "Enabling rtcuseutc...") + if env[:machine].provider_config.auto_nat_dns_proxy @logger.info("Automatically figuring out whether to enable/disable NAT DNS proxy...")