Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
Nächste Überarbeitung | Vorherige Überarbeitung | ||
lpi1:uhrzeit [2010/10/14 10:51] 127.0.0.1 Externe Bearbeitung |
lpi1:uhrzeit [2016/03/10 08:52] stefan_miethke [systemd timedatectl] |
||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
====== Systemuhr stellen ====== | ====== Systemuhr stellen ====== | ||
+ | ===== date ===== | ||
+ | |||
date --set "2006-03-26 01:59:30" | date --set "2006-03-26 01:59:30" | ||
oder | oder | ||
Zeile 8: | Zeile 10: | ||
Überprüfen: | Überprüfen: | ||
date | date | ||
+ | ===== systemd timedatectl ===== | ||
+ | timedatectl set-time '2006-03-26 01:59:30' | ||
+ | (( | ||
+ | oder (ab systemd Version 213) | ||
+ | ''/etc/systemd/timesyncd.conf'' : | ||
+ | <file> | ||
+ | [Time] | ||
+ | NTP=0.de.pool.ntp.org 1.de.pool.ntp.org 2.de.pool.ntp.org | ||
+ | FallbackNTP=0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org | ||
+ | </file> | ||
+ | timedatectl set-ntp true | ||
+ | )) | ||
+ | |||
+ | Überprüfen: | ||
+ | timedatectl | ||
====== Hardwareuhr stellen ====== | ====== Hardwareuhr stellen ====== | ||
+ | ===== hwclock ===== | ||
Die Hardwareuhr auf UTC einstellen: | Die Hardwareuhr auf UTC einstellen: | ||
hwclock --systohc --utc | hwclock --systohc --utc | ||
Zeile 19: | Zeile 37: | ||
hwclock --show | hwclock --show | ||
- | ====== Zeitzone einstellen ====== | + | ===== timedatectl ===== |
+ | Die Hardwareuhr auf UTC einstellen: | ||
+ | timedatectl set-local-rtc 0 | ||
+ | Die Hardwareuhr auf lokale Zeit einstellen: | ||
+ | timedatectl set-local-rtc 1 | ||
+ | | ||
+ | Überprüfen: | ||
+ | timedatectl status | ||
- | ===== Welche Zeitzone ist eingestellt? ===== | + | ====== Zeitzone einstellen ====== |
+ | ===== Systemweit ===== | ||
+ | ==== Welche Zeitzone ist eingestellt? ==== | ||
find /usr/share/zoneinfo/ -type f -exec md5sum {} \; | grep $(md5sum /etc/localtime | cut -d' ' -f1) | find /usr/share/zoneinfo/ -type f -exec md5sum {} \; | grep $(md5sum /etc/localtime | cut -d' ' -f1) | ||
oder | oder | ||
date | date | ||
+ | oder | ||
+ | timedatectl status | ||
- | ==== Doku ==== | + | ==== timedatectl ==== |
- | man tzfile | + | CentOS (ab 7), Debian (ab 8), openSuSE (ab 13.1) |
- | ===== Debian ===== | + | timedatectl set-timezone Europe/Berlin |
- | Debian ab 3.1 | + | |
- | tzconfig | + | |
- | Debian ab 5.0 | + | |
- | dpkg-reconfigure tzdata | + | |
- | Mehr Informationen: | + | ==== SuSE (bis SLES 11) ==== |
- | http://www.debian.org/doc/manuals/system-administrator/ch-sysadmin-time.html | + | |
- | + | ||
- | ===== SuSE ===== | + | |
''/etc/sysconfig/clock'' : | ''/etc/sysconfig/clock'' : | ||
<file> | <file> | ||
Zeile 47: | Zeile 69: | ||
</file> | </file> | ||
- | + | ==== CentOS / RedHat (bis 6.0) ==== | |
- | ===== CentOS / RedHat ===== | + | |
''/etc/sysconfig/clock'' : | ''/etc/sysconfig/clock'' : | ||
<file> | <file> | ||
Zeile 54: | Zeile 75: | ||
UTC=true | UTC=true | ||
</file> | </file> | ||
+ | |||
+ | ==== Debian (bis 7) ==== | ||
+ | Debian ab 5.0 | ||
+ | dpkg-reconfigure tzdata | ||
+ | |||
+ | Mehr Informationen: | ||
+ | http://www.debian.org/doc/manuals/system-administrator/ch-sysadmin-time.html | ||
''/etc/default/rcS'' : | ''/etc/default/rcS'' : | ||
Zeile 60: | Zeile 88: | ||
</file> | </file> | ||
+ | ===== persönlich ===== | ||
+ | [[lokalisierung_und_internationalisierung#persoenliche_zeitzone_einstellen]] | ||