Skip to content

Latest commit

 

History

History
100 lines (64 loc) · 1.52 KB

date.rst

File metadata and controls

100 lines (64 loc) · 1.52 KB

Date and time.

Windows assume that system timer display locale time.

UTC=no - system timer display locale time, UTC=yes - UTC time:

$ cat /etc/default/rcS
UTC=no
# or UTC=yes

If system dual boot with Windows you must set UTC=no.

$ date +"%Y-%m-%d %H:%M:%S"
$ sudo date --set="2009-02-22 12:12:00" +"%Y-%m-%d %H:%M:%S"

Or set utc time:

$ sudo date --utc --set="2009-02-22 12:12:00" +"%Y-%m-%d %H:%M:%S"

May be prefer use ntpdate(8) command.

System wide configuration:

$ cat /etc/timezone
$ tzselect
$ sudo tzconfig
...

Or using tzselect:

$ sudo tzselect
...
$ sudo dpkg-reconfigure tzdata

Current timestamp:

$ date +%s

Timestamp for specific date/time:

$ date -d '2010-12-11' +%s
$ date -d '2010-12-11 23:59:59' +%s
$ date -d '1970-01-01 + 1234567890 seconds'