From bdd1e564921d7001c218d1e7bcde925057f9b3dc Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 21 Aug 2011 15:10:37 +0000 Subject: Correct draw_clock modes, --- src/client/infowidget.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/client/infowidget.cc') diff --git a/src/client/infowidget.cc b/src/client/infowidget.cc index 752c09b..c99a3f2 100644 --- a/src/client/infowidget.cc +++ b/src/client/infowidget.cc @@ -207,19 +207,19 @@ void ClockInfoWidget::draw() sys::get_localtime(hours, minutes, seconds); std::ostringstream clockstr; - clockstr << std::setfill('0') << std::setw(2); + clockstr << std::setfill(' ') << std::setw(2); if (mode() == Clock12Hours) { std::string suffix("am"); if (hours >= 12) { - suffix[1] = 'p'; + suffix[0] = 'p'; hours -= 12; } if (hours == 0) { hours += 12; } - clockstr << hours << ":" << std::setfill('0') << std::setw(2) << minutes << suffix; + clockstr << hours << ":" << std::setfill('0') << std::setw(2) << minutes << " " << suffix; } else { clockstr << " " << hours << ":" << std::setfill('0') << std::setw(2) << minutes; } -- cgit v1.2.3