Timezone

From Teknologisk videncenter
Jump to: navigation, search

Setting timezone

Ubuntu

See datetime settings:

$ timedatectl
               Local time: Sun 2023-07-30 07:56:25 UTC
           Universal time: Sun 2023-07-30 07:56:25 UTC
                 RTC time: Sun 2023-07-30 07:56:26
                Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

Setting local timezone. See /usr/share/zoneinfo directory for paths to zoneinfo files.

$ sudo timedatectl set-timezone Europe/Copenhagen
$ timedatectl
               Local time: Sun 2023-07-30 09:58:31 CEST
           Universal time: Sun 2023-07-30 07:58:31 UTC
                 RTC time: Sun 2023-07-30 07:58:32
                Time zone: Europe/Copenhagen (CEST, +0200)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

Links

FreeBSD

cp /usr/share/zoneinfo/Europe/Copenhagen /etc/localtime