Date

From The World according to Vissie
Revision as of 23:14, 10 October 2017 by Vissie (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

To check the date or time:

date
Sun Sep  4 12:18:00 SAST 2011

To set the date/time:

date -s "28 Aug 2011 12:11:00"
date +%Y%m%d%H%M -s "201710110914"

To check the hardware clock:

hwclock
Mon Sep  4 12:27:12 2000  -0.439853 seconds

To sync current date/time to hardware clock:

hwclock --systohc
Sun Sep  4 12:28:12 2011  -0.336885 seconds