movement internal time is now UTC
This commit is contained in:
@@ -69,7 +69,7 @@ static void schedule_countdown(countdown_state_t *state) {
|
||||
|
||||
// Calculate the new state->now_ts but don't update it until we've updated the target -
|
||||
// avoid possible race where the old target is compared to the new time and immediately triggers
|
||||
uint32_t new_now = watch_utility_date_time_to_unix_time(watch_rtc_get_date_time(), movement_get_current_timezone_offset());
|
||||
uint32_t new_now = watch_utility_date_time_to_unix_time(movement_get_utc_date_time(), movement_get_current_timezone_offset());
|
||||
state->target_ts = watch_utility_offset_timestamp(new_now, state->hours, state->minutes, state->seconds);
|
||||
state->now_ts = new_now;
|
||||
watch_date_time target_dt = watch_utility_date_time_from_unix_time(state->target_ts, movement_get_current_timezone_offset());
|
||||
@@ -196,7 +196,7 @@ void countdown_face_setup(uint8_t watch_face_index, void ** context_ptr) {
|
||||
void countdown_face_activate(void *context) {
|
||||
countdown_state_t *state = (countdown_state_t *)context;
|
||||
if(state->mode == cd_running) {
|
||||
watch_date_time now = watch_rtc_get_date_time();
|
||||
watch_date_time now = movement_get_utc_date_time();
|
||||
state->now_ts = watch_utility_date_time_to_unix_time(now, movement_get_current_timezone_offset());
|
||||
watch_set_indicator(WATCH_INDICATOR_SIGNAL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user