diff --git a/src/preferences/time/TZDisplay.cpp b/src/preferences/time/TZDisplay.cpp index f68ef77162..80fcecedf1 100644 --- a/src/preferences/time/TZDisplay.cpp +++ b/src/preferences/time/TZDisplay.cpp @@ -9,6 +9,8 @@ * */ +#include + #include "TZDisplay.h" @@ -125,8 +127,10 @@ TTZDisplay::SetTime(int32 hour, int32 minute) if (hour > 11) ap = "PM"; - fTime.SetTo(""); - fTime << ahour << ":" << minute << ":" << ap; + char buffer[32]; + snprintf(buffer, sizeof(buffer), "%ld:%02ld %s", ahour, minute, ap); + + fTime.SetTo(buffer); Invalidate(); }