Fix for "zwanzig nach" x hours.

This commit is contained in:
2023-09-29 01:34:11 +02:00
parent ed8e4dd9ef
commit 047ed7ae85

View File

@@ -164,11 +164,13 @@ String time_to_string(uint8_t hours, uint8_t minutes)
message += "FUNF VOR ";
}
// convert hours to 12h format
if (minutes >= 20)
// increment hour when 25 minutes of an hour have passed
if (minutes >= 25)
{
hours++;
}
// convert hours to 12h format
if (hours > 12) // 24h -> 12h, except 12h
{
hours -= 12;