Skip to content

Commit

Permalink
Fixed more incorrect TZ references
Browse files Browse the repository at this point in the history
  • Loading branch information
voloved committed Oct 28, 2024
1 parent a44d3c1 commit 9937709
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion movement/movement.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ bool movement_default_loop_handler(movement_event_t event, movement_settings_t *
break;
case EVENT_LOW_ENERGY_UPDATE:
if (movement_state.current_face_idx >= (int16_t)MOVEMENT_TERIARY_FACE_INDEX)
display_time(watch_rtc_get_date_time(), movement_state.settings.bit.clock_mode_24h);
display_time(movement_get_local_date_time(), movement_state.settings.bit.clock_mode_24h);
break;
default:
break;
Expand Down
2 changes: 1 addition & 1 deletion movement/watch_faces/complication/endless_runner_face.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ static void display_fuel(uint8_t subsecond, uint8_t difficulty) {

static void check_and_reset_hi_score(endless_runner_state_t *state) {
// Resets the hi score at the beginning of each month.
watch_date_time date_time = watch_rtc_get_date_time();
watch_date_time date_time = movement_get_local_date_time();
if ((state -> year_last_hi_score != date_time.unit.year) ||
(state -> month_last_hi_score != date_time.unit.month))
{
Expand Down
6 changes: 3 additions & 3 deletions movement/watch_faces/complication/festival_schedule_face.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ static void _handle_btn_up(festival_schedule_state_t *state, bool clock_mode_24h
return;
}
if (!state->festival_occurring) return;
watch_date_time curr_time = watch_rtc_get_date_time();
watch_date_time curr_time = movement_get_local_date_time();
if (!state->showing_title) state->curr_stage = handling_light ? (state->curr_stage - 1 + STAGE_COUNT) % STAGE_COUNT : (state->curr_stage + 1) % STAGE_COUNT;
else state->showing_title = false;
if (SHOW_EMPTY_STAGES)
Expand All @@ -325,7 +325,7 @@ static void _show_title(festival_schedule_state_t *state){
watch_clear_colon();
watch_clear_all_indicators();
state->cyc_through_all_acts = false;
watch_date_time curr_time = watch_rtc_get_date_time();
watch_date_time curr_time = movement_get_local_date_time();
state -> prev_day = (curr_time.reg >> 17);
state -> festival_occurring = _festival_occurring(curr_time, true);
if (state -> festival_occurring) _display_curr_day(curr_time);
Expand Down Expand Up @@ -415,7 +415,7 @@ bool festival_schedule_face_loop(movement_event_t event, movement_settings_t *se
handle_ts_ticks(state, settings->bit.clock_mode_24h);

if (state->cyc_through_all_acts) break;
curr_time = watch_rtc_get_date_time();
curr_time = movement_get_local_date_time();
bool newDay = ((curr_time.reg >> 17) != (state -> prev_day));
state -> prev_day = (curr_time.reg >> 17);
state -> festival_occurring = _festival_occurring(curr_time, (newDay && !state->cyc_through_all_acts));
Expand Down
2 changes: 1 addition & 1 deletion movement/watch_faces/complication/party_face.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static void _party_face_init_lcd(party_state_t *state) {
state->party_text = (state->party_text + 1) % textArrayNum;
watch_set_indicator(WATCH_INDICATOR_BELL);
}
date_time = watch_rtc_get_date_time();
date_time = movement_get_local_date_time();
if (state->prev_text == state->text && date_time.unit.day == state->curr_day){
disp_loc = 5;
sprintf(text, "%s",textArray[state->party_text]);
Expand Down
2 changes: 1 addition & 1 deletion movement/watch_faces/complication/wordle_face.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ static void display_wait(wordle_state_t *state) {
#endif

static uint32_t get_day_unix_time(void) {
watch_date_time now = watch_rtc_get_date_time();
watch_date_time now = movement_get_local_date_time();
#if WORDLE_USE_DAILY_STREAK == 2
now.unit.hour = now.unit.minute = now.unit.second = 0;
#endif
Expand Down
2 changes: 1 addition & 1 deletion movement/watch_faces/sensor/thermistor_logging_face.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static void _thermistor_readout_face_update_display(bool in_fahrenheit) {
}

static void _thermistor_readout_face_blink_display(bool in_fahrenheit) {
watch_date_time date_time = watch_rtc_get_date_time();
watch_date_time date_time = movement_get_utc_date_time(); // Only cares about the seconds.
if (date_time.unit.second % 5 == 0 || !_displaying_curr) {
_thermistor_readout_face_update_display(in_fahrenheit);
watch_clear_indicator(WATCH_INDICATOR_SIGNAL);
Expand Down

0 comments on commit 9937709

Please sign in to comment.