Fix for "zwanzig nach" x hours.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user