diff options
author | Stijn Buys <ingar@osirion.org> | 2011-08-21 15:10:37 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2011-08-21 15:10:37 +0000 |
commit | bdd1e564921d7001c218d1e7bcde925057f9b3dc (patch) | |
tree | b2a359aa4ca610b68bc2dd17a21eda3143ec9094 /src/client/infowidget.cc | |
parent | 1e827da99645588e2add6d667c54d674add99890 (diff) |
Correct draw_clock modes,
Diffstat (limited to 'src/client/infowidget.cc')
-rw-r--r-- | src/client/infowidget.cc | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |