summaryrefslogtreecommitdiff
path: root/test-date.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-01 19:34:56 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-01 19:34:56 (GMT)
commit68849b544258cafdf42f3ebe9772ee7a346f7147 (patch)
tree908c0d82bd1f423abff08162cc5156f736a016cd /test-date.c
parent198b0fb635ed8a007bac0c16eab112c5e2c7995c (diff)
downloadgit-68849b544258cafdf42f3ebe9772ee7a346f7147.zip
git-68849b544258cafdf42f3ebe9772ee7a346f7147.tar.gz
git-68849b544258cafdf42f3ebe9772ee7a346f7147.tar.bz2
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.
Diffstat (limited to 'test-date.c')
-rw-r--r--test-date.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test-date.c b/test-date.c
index 8ec41c3..6fe3e28 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;
}