]> git.sur5r.net Git - cc65/commitdiff
Have %I yield values [1..12] instead of [0..11].
authorOliver Schmidt <ol.sc@web.de>
Mon, 9 Dec 2013 18:53:27 +0000 (19:53 +0100)
committerOliver Schmidt <ol.sc@web.de>
Mon, 9 Dec 2013 18:53:54 +0000 (19:53 +0100)
libsrc/common/strftime.c

index 49d2677cf2aa8c4ac25a21d955f4e9a214f411c9..25cfd06069a53886077ebe07887e66a0d0098a7a 100644 (file)
@@ -114,7 +114,7 @@ size_t __fastcall__ strftime (char* buf, size_t bufsize, const char* format,
                     break;
 
                 case 'I':
-                    sprintf (arg, "%02d", tm->tm_hour % 12);
+                    sprintf (arg, "%02d", (tm->tm_hour + 11) % 12 + 1);
                     break;
 
                 case 'M':