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 ";
|
message += "FUNF VOR ";
|
||||||
}
|
}
|
||||||
|
|
||||||
// convert hours to 12h format
|
// increment hour when 25 minutes of an hour have passed
|
||||||
if (minutes >= 20)
|
if (minutes >= 25)
|
||||||
{
|
{
|
||||||
hours++;
|
hours++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// convert hours to 12h format
|
||||||
if (hours > 12) // 24h -> 12h, except 12h
|
if (hours > 12) // 24h -> 12h, except 12h
|
||||||
{
|
{
|
||||||
hours -= 12;
|
hours -= 12;
|
||||||
|
|||||||
Reference in New Issue
Block a user