From owner-freebsd-bugs Thu Dec 2 4:12: 8 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 6E29F14F44 for ; Thu, 2 Dec 1999 04:12:06 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id EAA53155; Thu, 2 Dec 1999 04:10:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Date: Thu, 2 Dec 1999 04:10:02 -0800 (PST) Message-Id: <199912021210.EAA53155@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Sheldon Hearn Subject: Re: bin/13901: strptime breaks when handling some numerical fields Reply-To: Sheldon Hearn Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/13901; it has been noted by GNATS. From: Sheldon Hearn To: freebsd-gnats-submit@freebsd.org Cc: Subject: Re: bin/13901: strptime breaks when handling some numerical fields Date: Thu, 02 Dec 1999 14:05:43 +0200 This How-To-Repeat is more visually effective. :-) Ciao, Sheldon. #include #include struct tm t1, t2, t3; int main(void) { strptime("19990823", "%Y%m%d", &t1); /* fails */ strptime("0711", "%m%d", &t2); /* fails */ strptime("199911", "%Y11", &t3); /* fails */ printf("19990823 -> %%Y%%m%%d:\n" "tm_year == %d\n" "tm_mon == %d\n" "tm_mday == %d\n\n", t1.tm_year, t1.tm_mon, t1.tm_mday); printf(" 0711 -> %%m%%d:\n" "tm_mon == %d\n" "tm_mday == %d\n\n", t2.tm_mon, t2.tm_mday); printf(" 199911 -> %%Y11:\n" "tm_year == %d\n", t3.tm_year); return 0; } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message