The timezone now auto-corrects with DST (but still displays the same offset in the settings screen to the user)

This commit is contained in:
David Volovskiy
2024-08-02 01:25:01 -04:00
parent 149911e4ad
commit 4c546b14dc
22 changed files with 75 additions and 98 deletions

View File

@@ -232,12 +232,13 @@ bool set_time_hackwatch_face_loop(movement_event_t event, movement_settings_t *s
watch_clear_colon();
sprintf(buf, "%s ", set_time_hackwatch_face_titles[current_page]);
} else {
int16_t tz = get_timezone_offset(settings->bit.time_zone, date_time_settings);
watch_set_colon();
sprintf(buf,
"%s %3d%02d ",
set_time_hackwatch_face_titles[current_page],
(int8_t)(movement_timezone_offsets[settings->bit.time_zone] / 60),
(int8_t)(movement_timezone_offsets[settings->bit.time_zone] % 60) * (movement_timezone_offsets[settings->bit.time_zone] < 0 ? -1 : 1));
(int8_t)(tz / 60),
(int8_t)(tz % 60) * (tz < 0 ? -1 : 1));
}
}