From 68849b544258cafdf42f3ebe9772ee7a346f7147 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sun, 1 May 2005 12:34:56 -0700 Subject: date handling: handle "AM"/"PM" on time And be a bitmore careful about matching: if we don't recognize a word or a number, we skip the whole thing, rather than trying the next character in that word/number. Finally: since ctime() adds the final '\n', don't add another one in test-date. --- test-date.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test-date.c') diff --git a/test-date.c b/test-date.c index 8ec41c3118..6fe3e28b9d 100644 --- a/test-date.c +++ b/test-date.c @@ -14,7 +14,7 @@ int main(int argc, char **argv) memcpy(result, "bad", 4); parse_date(argv[i], result, sizeof(result)); t = strtoul(result, NULL, 0); - printf("%s -> %s -> %s\n", argv[i], result, ctime(&t)); + printf("%s -> %s -> %s", argv[i], result, ctime(&t)); } return 0; } -- cgit v1.2.1