I’m currently looking for a way to update the timezone (and/or offset) used by snap refresh.timer.
Long story short. I have an Ubuntu 22.04 (Test) Server which was set to use UTC timezone during the installation. Today, I want to change the timezone of the system to America/Los_Angeles however snap refresh schedule doesn’t seem to play along correctly - or (perhaps) I have to calculate the offset myself. I have tried rebooting the (test) server but Snap still isn’t playing along.
In reality, it’s actually the the other way around. I have a couple of other Ubuntu 22.04 Server units which all have America/Los_Angeles timezone defined. Now I want to streamline across the fleet and update their timezone to UTC. Wondering if I’ll run into the same issue.
Is there a configuration file or alike somewhere on the system that I can modify? How do I go about address this challenge? Any input is highly appreciated.
snap version:
snap 2.59.5
snapd 2.59.5
series 16
ubuntu 22.04
kernel 5.15.0-71-generic
Test unit, initially UTC timezone (UTC +00:00):
timedatectl:
Local time: Thu 2023-07-06 19:31:22 UTC
Universal time: Thu 2023-07-06 19:31:22 UTC
RTC time: Thu 2023-07-06 19:31:22
Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
ls -l /etc/localtime:
lrwxrwxrwx 1 root root 27 Jul 6 19:31 /etc/localtime -> /usr/share/zoneinfo/Etc/UTC
cat /etc/timezone:
Etc/UTC
snap get system system.timezone:
UTC
snap get system refresh.timer:
sat5,23:00-01:00
snap refresh --time:
timer: sat5,23:00-01:00
last: 12 days ago, at 23:02 UTC
next: in 23 days, at 23:00 UTC
Test unit, after timezone changed from UTC (+00:00) to America/Los_Angeles (-08:00 / -07:00):
timedatectl:
Local time: Thu 2023-07-06 12:17:46 PDT
Universal time: Thu 2023-07-06 19:17:46 UTC
RTC time: Thu 2023-07-06 19:17:46
Time zone: America/Los_Angeles (PDT, -0700)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
ls -l /etc/localtime:
lrwxrwxrwx 1 root root 39 Jul 6 12:02 /etc/localtime -> /usr/share/zoneinfo/America/Los_Angeles
cat /etc/timezone:
America/Los_Angeles
snap get system system.timezone:
UTC
snap get system refresh.timer:
sat5,23:00-01:00
snap refresh --time:
timer: sat5,23:00-01:00
last: 12 days ago, at 16:02 PDT
next: in 23 days, at 16:00 PDT
debug log:
snapd[552559]: logger.go:92: DEBUG: Next refresh scheduled for 2023-07-29T16:00:00-07:00.
Here’s one of my other units, set to America/Los_Angeles timezone during the installation: Unfortunately, can’t change the timezone to UTC just yet as this is one of my live production units.
timedatectl:
Local time: Thu 2023-07-06 10:25:09 PDT
Universal time: Thu 2023-07-06 17:25:09 UTC
RTC time: Thu 2023-07-06 17:25:09
Time zone: America/Los_Angeles (PDT, -0700)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
ls -l /etc/localtime:
lrwxrwxrwx 1 root root 39 May 31 09:01 /etc/localtime -> /usr/share/zoneinfo/America/Los_Angeles
cat /etc/timezone:
America/Los_Angeles
snap get system system.timezone:
UTC
snap get system refresh.timer:
sat5,23:00-01:00
snap refresh --time:
timer: sat5,23:00-01:00
last: 12 days ago, at 23:03 PDT
next: in 23 days, at 23:00 PDT