I read the snappy config command, but I still can't change timezone. The example doesn't looks like a terminal command!
Can you help me to set my snappy timezone?
Thank you
I read the snappy config command, but I still can't change timezone. The example doesn't looks like a terminal command!
Can you help me to set my snappy timezone?
Thank you
You can use the snappy
command. The timezone is a property of the OS, which in Ubuntu Core is called ubuntu-core
and this snappy part is managed by snappy
itself.
To read the current configuration for a part just run
snappy config [snap part]
And to apply one run
snappy config [snap part] [config]
To particularly change the timezone (to America/Cordoba in this example)
CONFIG=/tmp/core_config
snappy config ubuntu-core > "$CONFIG"
sed -i 's/timezone: .*$/timezone: America/Cordoba/' > "$CONFIG"
sudo snappy config ubuntu-core "$CONFIG"
Take note that due to a bug in the
snappy
command itself, this can't be piped in one single statement which is why I show it in three lines.
the way it's done now is:
sudo timedatectl set-timezone <timezone>
you can get your timezone string for timedatectl with timedatectl:
timedatectl list-timezones
source: ogra's (contributor to Core) reply reply on the snapcraft forum.
sergiusens answer have few errors, example should look like this:
CONFIG=/tmp/core_config
snappy config ubuntu-core > "$CONFIG"
sed -i 's/timezone: .*$/timezone: America\/Cordoba/' "$CONFIG"
sudo snappy config ubuntu-core "$CONFIG"
Forward slash before "Cordoba" need to be escaped and do not use write symbol ">"