Justin Howard / Mbed 2 deprecated AdaFruit_RGBLCD

Dependencies:   AdaFruit_RGBLCDShield MCP23017 mbed RTclock

Dependents:   SX1276_GPS

Fork of MCP_test by Wim Huiskamp

Files at this revision

API Documentation at this revision

Comitter:
vtraveller
Date:
Thu Aug 14 12:02:38 2014 +0000
Parent:
17:731a47339cb8
Child:
19:72c02acb601d
Commit message:
Fix for midday format issue.

Changed in this revision

Modules/TimeModule.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Modules/TimeModule.cpp	Thu Aug 14 10:47:27 2014 +0000
+++ b/Modules/TimeModule.cpp	Thu Aug 14 12:02:38 2014 +0000
@@ -122,7 +122,7 @@
         if (m_cRTclock.isTwelveHour())
         {
             pUnits = (sTM.tm_hour < 12) ? "am":"pm";
-            sTM.tm_hour %= 12;
+            if (sTM.tm_hour > 12) sTM.tm_hour %= 12;
         }
     }
     else