Staging
v0.5.1
https://github.com/git/git
Revision baf0bfcb4b335438e9359835f2c27cccf20e54a3 authored by Junio C Hamano on 08 November 2006, 00:36:11 UTC, committed by Junio C Hamano on 08 November 2006, 00:36:11 UTC
Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent c56f243
Raw File
Tip revision: baf0bfcb4b335438e9359835f2c27cccf20e54a3 authored by Junio C Hamano on 08 November 2006, 00:36:11 UTC
GIT 1.4.3-rc1
Tip revision: baf0bfc
test-date.c
#include <stdio.h>
#include <time.h>

#include "cache.h"

int main(int argc, char **argv)
{
	int i;

	for (i = 1; i < argc; i++) {
		char result[100];
		time_t t;

		memcpy(result, "bad", 4);
		parse_date(argv[i], result, sizeof(result));
		t = strtoul(result, NULL, 0);
		printf("%s -> %s -> %s", argv[i], result, ctime(&t));

		t = approxidate(argv[i]);
		printf("%s -> %s\n", argv[i], ctime(&t));
	}
	return 0;
}
back to top