From 938dcbbd551f8036d9c8da2362af414de3831fb6 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Sat, 31 Oct 2026 14:04:34 -0400 Subject: [PATCH] Tidy time/date updates --- src/c/main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/c/main.c b/src/c/main.c index ca3635c..593e205 100644 --- a/src/c/main.c +++ b/src/c/main.c @@ -174,17 +174,20 @@ static void update_minute_60_out_handler(Animation *animation, bool finished, vo } static void minute_handler(struct tm *tick_time, TimeUnits units_changed) { - // time/date updates + // time update static char s_time_buffer[8]; strftime(s_time_buffer, sizeof(s_time_buffer), clock_is_24h_style() ? "%H:%M" : "%I:%M", tick_time); + text_layer_set_text(s_time_layer, s_time_buffer); + + // date update static char s_date_buffer[16]; #if PBL_DISPLAY_WIDTH <= 144 strftime(s_date_buffer, sizeof(s_date_buffer), "%m%d", tick_time); #else strftime(s_date_buffer, sizeof(s_date_buffer), "%m.%d", tick_time); #endif - text_layer_set_text(s_time_layer, s_time_buffer); text_layer_set_text(s_date_layer, s_date_buffer); + // create date/bt centering animations //// count "1"s in s_time_buffer static uint8_t ones;