LoginSignup
0
0

More than 5 years have passed since last update.

Linuxのdateコマンドで日付変更

Posted at
  • コマンド
date MMDDhhmm[CC][YY][.ss]

MM(月)
DD(日)
hh(時)
mm(分)
CC(年、西暦の上 2桁)
YY(年、西暦の上 2桁)
.ss(秒)
[vagrant@localhost ~]$ date
2016年  9月 30日 金曜日 05:38:04 CEST
[vagrant@localhost ~]$ sudo date 10011500
2016年 10月  1日 土曜日 15:00:00 CEST
[vagrant@localhost ~]$ date
2016年 10月  1日 土曜日 15:00:03 CEST 
  • vagrantで構築した環境の場合、ホストOSの時刻にすぐ同期されるので解除しておく
    • sudo service vboxadd-service stop
  • 同期を再開する場合はstopをstartに変更すれば再開される
    • sudo service vboxadd-service start
0
0
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
0
0