Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
lpi1:uhrzeit [2015/08/18 11:45] ingo_wichmann |
lpi1:uhrzeit [2023/05/04 16:28] |
||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ====== Systemuhr stellen ====== | ||
- | ===== date ===== | ||
- | |||
- | date --set "2006-03-26 01:59:30" | ||
- | oder | ||
- | date 032601592006 | ||
- | oder | ||
- | ntpdate pool.ntp.org | ||
- | |||
- | Überprüfen: | ||
- | date | ||
- | ===== systemd timedatectl ===== | ||
- | timedatectl set-time '2006-03-26 01:59:30' | ||
- | (( | ||
- | oder (ab systemd Version 213) | ||
- | //Todo: stimmt das?// | ||
- | |||
- | ''/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 ====== | ||
- | ===== hwclock ===== | ||
- | Die Hardwareuhr auf UTC einstellen: | ||
- | hwclock --systohc --utc | ||
- | |||
- | Die Hardwareuhr auf lokale Zeit einstellen: | ||
- | hwclock --systohc --localtime | ||
- | |||
- | Überprüfen: | ||
- | hwclock --show | ||
- | |||
- | ===== 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 | ||
- | |||
- | ====== Zeitzone einstellen ====== | ||
- | ===== Systemweit ===== | ||
- | ==== Welche Zeitzone ist eingestellt? ==== | ||
- | find /usr/share/zoneinfo/ -type f -exec md5sum {} \; | grep $(md5sum /etc/localtime | cut -d' ' -f1) | ||
- | oder | ||
- | date | ||
- | oder | ||
- | timedatectl status | ||
- | |||
- | ==== timedatectl ==== | ||
- | CentOS (ab 7), Debian (ab 8), openSuSE (ab 13.1) | ||
- | |||
- | timedatectl set-timezone Europe/Berlin | ||
- | |||
- | ==== SuSE (bis SLES 11) ==== | ||
- | ''/etc/sysconfig/clock'' : | ||
- | <file> | ||
- | HWCLOCK="-u" | ||
- | TIMEZONE="Europe/Berlin" | ||
- | DEFAULT_TIMEZONE="Europe/Berlin" | ||
- | </file> | ||
- | |||
- | ==== CentOS / RedHat (bis 6.0) ==== | ||
- | ''/etc/sysconfig/clock'' : | ||
- | <file> | ||
- | ZONE="Europe/Berlin" | ||
- | UTC=true | ||
- | </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'' : | ||
- | <file> | ||
- | UTC=yes | ||
- | </file> | ||
- | |||
- | ===== persönlich ===== | ||
- | [[lokalisierung_und_internationalisierung#persoenliche_zeitzone_einstellen]] | ||