Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(time): Update applet timezone on change #602

Merged

Conversation

joshuamegnauth54
Copy link
Contributor

@joshuamegnauth54 joshuamegnauth54 commented Aug 17, 2024

Closes: #582

The chrono crate caches the local timezone but doesn't update it. This makes sense because it'd be inefficient to constantly evaluate the local timezone.

Instead of using the local timezone, this patch changes the applet to use a fixed offset internally which is updated if the external timezone changes.

I added two new dependencies to the time applet.

  • pop-os/dbus-settings-bindings for a wrapper around the D-Bus interface for timezone updates
  • chronotope/chrono-tz for timezone information and parsing. This crate is maintained by the same developers as chrono, and the documentation recommends using it for situations like this.

Closes: pop-os#582

The chrono crate caches the local timezone but doesn't update it. This
makes sense because it'd be inefficient to constantly evaluate the local
timezone.

Instead of using the local timezone, this patch changes the applet to
use a fixed offset internally which is updated if the external timezone
changes.
@mmstick mmstick merged commit 323e8a5 into pop-os:master Aug 17, 2024
2 checks passed
@joshuamegnauth54 joshuamegnauth54 deleted the fix-582-datetime-only-updates-reboot branch August 17, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Date/Time Update - Takes effect after reboot
2 participants