Ubuntu Core 16 – Wie kann ich die Zeitzone dauerhaft ändern?

Ubuntu Core 16 – Wie kann ich die Zeitzone dauerhaft ändern?

um die Zeitzone einzustellen habe ich Folgendes versucht:

auser@localhost:~$ sudo timedatectl
      Local time: Fri 2019-05-17 06:46:14 UTC
  Universal time: Fri 2019-05-17 06:46:14 UTC
        RTC time: Fri 2019-05-17 06:46:13
       Time zone: n/a (UTC, +0000)
 Network time on: yes
NTP synchronized: no
 RTC in local TZ: no
auser@localhost:~$ sudo timedatectl set-ntp 0
auser@localhost:~$ sudo timedatectl
      Local time: Fri 2019-05-17 06:46:34 UTC
  Universal time: Fri 2019-05-17 06:46:34 UTC
        RTC time: Fri 2019-05-17 06:46:33
       Time zone: n/a (UTC, +0000)
 Network time on: no
NTP synchronized: no
 RTC in local TZ: no
auser@localhost:~$ sudo timedatectl set-timezone Europe/Berlin
auser@localhost:~$ sudo timedatectl
      Local time: Fri 2019-05-17 08:46:56 CEST
  Universal time: Fri 2019-05-17 06:46:56 UTC
        RTC time: Fri 2019-05-17 06:46:55
       Time zone: Europe/Berlin (CEST, +0200)
 Network time on: no
NTP synchronized: no
 RTC in local TZ: no

Alles sieht gut aus, aber dann Neustart ...

auser@localhost:~$ sudo reboot
auser@localhost:~$ sudo timedatectl
      Local time: Fri 2019-05-17 06:48:51 UTC
  Universal time: Fri 2019-05-17 06:48:51 UTC
        RTC time: Fri 2019-05-17 06:48:51
       Time zone: n/a (UTC, +0000)
 Network time on: yes
NTP synchronized: no
 RTC in local TZ: no

NTP-Synchronisierung auf „Ja“ gestellt und Lokale Zeit und Zeitzone wieder auf UTC zurückgestellt. Wie kann ich diese ändern, damit sie einen Neustart überstehen?

Antwort1

Gehen Sie wie folgt vor, um Snappy zu installieren:

sudo apt install ubuntu-snappy-cli

Um die aktuelle Konfiguration für Ubuntu-Core zu lesen:

snappy config ubuntu-core

So aktualisieren Sie es:

CONFIG=/tmp/core_config

snappy config ubuntu-core > "$CONFIG"
sed -i 's/timezone: .*$/timezone: America\/Cordoba/' "$CONFIG"
sudo snappy config ubuntu-core "$CONFIG"

wie erwähntHier.

verwandte Informationen