--- strftime.cxx.old	2006-08-24 14:14:43.000000000 +0200
+++ strftime.cxx	2006-08-24 14:17:13.000000000 +0200
@@ -148,8 +148,8 @@ do_format(cyg_uint8 fmtchar, cyg_ucount3
     case 'I':
         if (sizeleft < 2)
             return -1;
-        buf[0] = ((timeptr->tm_hour%12 + 1) / 10) + '0';
-        buf[1] = ((timeptr->tm_hour%12 + 1) % 10) + '0';
+        buf[0] = (((timeptr->tm_hour%12) ? (timeptr->tm_hour%12) : 12) / 10) + '0';
+        buf[1] = (((timeptr->tm_hour%12) ? (timeptr->tm_hour%12) : 12) % 10) + '0';
         return 2;
     case 'j':
         if (sizeleft < 3)
