Skip to content

timezone.system fails on Debian when /etc/localtime is missing (3006.26–3006.27) #69803

Description

@XRasher

Description

timezone.system fails when /etc/localtime does not exist, even though
timedatectl reports the correct timezone. Affects Debian 12 (bookworm) on arm64.
Related: #65719 (fix appears to be in 3008.x only, not backported to 3006 LTS)

Setup

  • OS: Debian 12 bookworm, arm64
  • Salt: 3006.26 / 3006.27 (all reproduce)
  • State:
  Europe/Zurich:
    timezone.system

Steps to reproduce

sudo rm -f /etc/localtime
timedatectl show -p Timezone --value   # still prints Europe/Zurich
sudo salt-call state.sls timezone pillar='{"timezone":"Europe/Zurich"}'

Expected

State succeeds and creates/updates /etc/localtime (or uses timedatectl as source of truth).

Actual

Unable to compare desired timezone 'Europe/Zurich' to system timezone:
Failed to read /etc/localtime to determine current timezone: No such file or directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions