date.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Sat, 04 Dec 2010 16:21:48 +0200
changeset 731 58920092b506
parent 108 aab18e67e03b
child 732 93b95dfbdac1
permissions -rw-r--r--
Removed noise text.

-*- outline -*-

* System timer and system time.

** Windows.

Windows assume that system timer display locale time.

** Debian.

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.

* Getting current date/time.

  $ date +"%Y-%m-%d %H:%M:%S"

* Setting current date/time.

  $ 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.

* Get timezone.

System wide configuration:

  $ cat /etc/timezone

* Get list of supported timezone.

  $ tzselect

* Set timezone.

  $ sudo tzconfig
...

Or using tzselect:

  $ sudo tzselect
...

** Debian Lenny.

  $ sudo dpkg-reconfigure tzdata