movement internal time is now UTC

This commit is contained in:
joeycastillo
2024-10-05 01:27:07 -04:00
parent 411a64f44b
commit 12241386ea
11 changed files with 72 additions and 35 deletions

View File

@@ -62,7 +62,7 @@ static void _sunrise_sunset_face_update(sunrise_sunset_state_t *state) {
return;
}
watch_date_time date_time = watch_rtc_get_date_time(); // the current local date / time
watch_date_time date_time = movement_get_local_date_time(); // the current local date / time
watch_date_time utc_now = watch_utility_date_time_convert_zone(date_time, movement_get_current_timezone_offset(), 0); // the current date / time in UTC
watch_date_time scratch_time; // scratchpad, contains different values at different times
scratch_time.reg = utc_now.reg;
@@ -338,7 +338,7 @@ bool sunrise_sunset_face_loop(movement_event_t event, void *context) {
// if entering low energy mode, start tick animation
if (event.event_type == EVENT_LOW_ENERGY_UPDATE && !watch_sleep_animation_is_running()) watch_start_sleep_animation(1000);
// check if we need to update the display
watch_date_time date_time = watch_rtc_get_date_time();
watch_date_time date_time = movement_get_local_date_time();
if (date_time.reg >= state->rise_set_expires.reg) {
// and on the off chance that this happened before EVENT_TIMEOUT snapped us back to rise/set 0, go back now
state->rise_index = 0;