manpagez: man pages & more
info coreutils
Home | html | info | man

File: coreutils.info,  Node: Setting the time,  Next: Options for date,  Prev: Padding and other flags,  Up: date invocation

21.1.5 Setting the time
-----------------------

You must have appropriate privileges to set the system clock.  For
changes to persist across a reboot, the hardware clock may need to be
updated from the system clock, which might not happen automatically on
your system.

   To set the clock, you can use the ‘--set’ (‘-s’) option (*note
Options for date::).  To set the clock without using GNU extensions, you
can give ‘date’ an argument of the form ‘MMDDhhmm[[CC]YY][.ss]’ where
each two-letter component stands for two digits with the following
meanings:

MM
     month
DD
     day within month
HH
     hour
MM
     minute
CC
     first two digits of year (optional)
YY
     last two digits of year (optional)
SS
     second (optional)

   Note, the ‘--date’ and ‘--set’ options may not be used with an
argument in the above format.  The ‘--universal’ option may be used with
such an argument to indicate that the specified date and time are
relative to Universal Time rather than to the local time zone.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.