10
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Vagrantでホストとの時刻同期を止める

Posted at

Vagrantを開発環境として使っていてテストなどで時間を過去に設定したい時、以下のコマンドを実行することでホストとの時刻同期を止めることができます。

$ date
Tue Jul 11 01:39:04 UTC 2017
$ sudo service vboxadd-service stop

その後はdateコマンドで任意の時刻を設定します。

$ sudo date -s "2017/07/02 01:40:00"
$ date
Sun Jul  2 01:40:02 UTC 2017

テストが終わったら同期するよう戻します。

$ sudo service vboxadd-service start
$ date
Tue Jul 11 01:50:04 UTC 2017
10
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?