From 90bae964ce4a8ee2bdb67b1273c2e92fa1001cf3 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Wed, 30 Nov 2011 16:20:08 +1000 Subject: [PATCH] 12hr time fix. no 0:00pm --- Graphs/gSummaryChart.cpp | 2 ++ Graphs/gYAxis.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/Graphs/gSummaryChart.cpp b/Graphs/gSummaryChart.cpp index 39212c89..75aa616d 100644 --- a/Graphs/gSummaryChart.cpp +++ b/Graphs/gSummaryChart.cpp @@ -498,6 +498,8 @@ QString formatTime(EventDataType v, bool show_seconds=false, bool duration=false if (show_12hr) { h>=12 ? pm[0]='p' : pm[0]='a'; // yes, inverted.. h %= 12; + if (h==0) h=12; + } else { pm[0]=0; } diff --git a/Graphs/gYAxis.cpp b/Graphs/gYAxis.cpp index 42159391..51fcc65d 100644 --- a/Graphs/gYAxis.cpp +++ b/Graphs/gYAxis.cpp @@ -264,6 +264,7 @@ const QString gYAxisTime::Format(EventDataType v, int dp) if (show_12hr) { h>=12 ? pm[0]='p' : pm[0]='a'; // yes, inverted.. h %= 12; + if (h==0) h=12; } else { pm[0]=0; }