mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-23 21:13:16 +00:00
commit
dce2271330
1 changed files with 3 additions and 2 deletions
|
@ -39,11 +39,12 @@ static void clock_render_callback(Canvas* const canvas, void* ctx) {
|
|||
} else {
|
||||
bool pm = curr_dt.hour > 12;
|
||||
bool pm12 = curr_dt.hour >= 12;
|
||||
bool am12 = curr_dt.hour == 0;
|
||||
snprintf(
|
||||
time_string,
|
||||
TIME_LEN,
|
||||
CLOCK_TIME_FORMAT,
|
||||
pm ? curr_dt.hour - 12 : curr_dt.hour,
|
||||
pm ? curr_dt.hour - 12 : (am12 ? 12 : curr_dt.hour),
|
||||
curr_dt.minute,
|
||||
curr_dt.second);
|
||||
|
||||
|
|
Loading…
Reference in a new issue