aboutsummaryrefslogtreecommitdiff
path: root/test-date.c
blob: 8ec41c3118417b3f2e14a84978748ee52b7edd9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#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\n", argv[i], result, ctime(&t));
	}
	return 0;
}