summaryrefslogtreecommitdiffstats
path: root/main.c
blob: 9e78c041a98d30a1416414d4be0ea33cee6a522f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <stdio.h>
#include "posixtz.h"

int usage() {
	printf("Print POSIX TZ string from compiled tzdata\n"
		"Usage: posixtz FILE...\n");
	return -1;
}

int main(int argc, char *argv[])
{
	int i=1;
	if (argc <= 1)
		return usage();

	for (i = 1; i < argc; i++) {
		char *s = posix_tz(argv[i++]);
		if (s != NULL)
			printf("%s\n", s);
	}
	return 0;
}