Skip to content

Commit

Permalink
fix(time): Update calendar on timezone change
Browse files Browse the repository at this point in the history
Closes: #698
  • Loading branch information
joshuamegnauth54 authored and mmstick committed Dec 31, 2024
1 parent a9f9620 commit 7932be5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cosmic-applet-time/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ impl cosmic::Application for Window {
Message::TimezoneUpdate(timezone) => {
if let Ok(timezone) = timezone.parse::<chrono_tz::Tz>() {
self.now = chrono::Local::now().with_timezone(&timezone).fixed_offset();
self.date_selected = chrono::NaiveDate::from(self.now.naive_local());
self.timezone = Some(timezone);
}

Expand Down

0 comments on commit 7932be5

Please sign in to comment.