Repository navigation
Send NSPanels the POSIX TZ rule for the manager's timezone - #405
Merged
Merged
Conversation
The manager reads the rule from the end of the configured zone's tzdata
file and sends it in NSPanelConfig.tz_posix, so a panel can render local
time from its own clock with setenv("TZ") and tzset(). Empty if the rule
could not be read.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jamesmulcahy
marked this pull request as ready for review
October 17, 2026 21:08
tpanajott
reviewed
Oct 18, 2026
A failure to read the tzdata file should only mean panels fall back to the manager's time, never break loading the config. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jamesmulcahy
added a commit
to jamesmulcahy/NSPanelManager
that referenced
this pull request
Oct 21, 2026
NSPManager#405 added NSPanelConfig.tz_posix to protobuf_nspanel.proto and regenerated the MQTTManager C++ code, but not the protobuf-c code the firmware builds against. Taken from the protobuf check's output, so it is exactly what CI generates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jamesmulcahy
added a commit
to jamesmulcahy/NSPanelManager
that referenced
this pull request
Oct 21, 2026
Three .proto changes regenerated the MQTTManager C++ code but not the protobuf-c code in protobuf_firmware/ that the firmware builds against: - NSPManager#385 added volume_step to NSPanelEntityState.MediaPlayer - NSPManager#394 added the Sound message and NSPanelConfig.sounds - NSPManager#405 added NSPanelConfig.tz_posix The protobuf check added later in this series caught all three. Generated with protoc 27.0 and protoc-gen-c 1.4.1, as CI does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jamesmulcahy
added a commit
to jamesmulcahy/NSPanelManager
that referenced
this pull request
Oct 22, 2026
Two .proto changes regenerated the MQTTManager C++ code but not the protobuf-c code in protobuf_firmware/ that the firmware builds against: - NSPManager#394 added the Sound message and NSPanelConfig.sounds - NSPManager#405 added NSPanelConfig.tz_posix The protobuf check added later in this series caught both. Generated with protoc 27.0 and protoc-gen-c 1.4.1, as CI does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #402. This lets a panel render local time from its own clock, once it has been given the time by #404. No user configuration is needed: the manager works out the rule from the timezone it already runs in.
NSPanelConfig.tz_posix(field 46). It holds the POSIX TZ rule for the manager's timezone, e.g.CET-1CEST,M3.5.0,M10.5.0/3, ready forsetenv("TZ", ...)andtzset()on the panel. It is empty if the manager couldn't work it out, in which case panels keep showingstatus/timeas they do today./usr/share/zoneinfo/<zone>, using the zone it already reads from/etc/timezone. Version 2 and later tzdata files end with this rule (RFC 8536, section 3.3). Version 1 files, missing files and files with an empty rule give an empty string.tail -n1on all 447 zones in tzdata 2025b.Independent of #403 and #404.
Known gaps, deliberately not handled
tzset()accepts them still has to be checked on a panel.In both cases the manager's
status/timetopics are still there to fall back on.🤖 Generated with Claude Code