Index: lib/libc/stdtime/strptime.c =================================================================== --- lib/libc/stdtime/strptime.c +++ lib/libc/stdtime/strptime.c @@ -291,8 +291,10 @@ if (c == 'H' || c == 'k') { if (i > 23) return (NULL); - } else if (i > 12) - return (NULL); + } else { + if (i == 0 || i > 12) + return (NULL); + } tm->tm_hour = i;