From ecee9d9e793c7573cf3730fb9746527a0a7e94e7 Mon Sep 17 00:00:00 2001 From: Edgar Toernig Date: Sat, 30 Apr 2005 09:46:49 -0700 Subject: [PATCH] Do date parsing by hand... ...since everything out there is either strange (libc mktime has issues with timezones) or introduces unnecessary dependencies for people (libcurl). This goes back to the old date parsing, but moves it out into a file of its own, and does the "struct tm" to "seconds since epoch" handling by hand. I grepped through the tz-database and it seems there's one "country" left that has non-60-minute DST: Lord Howe Island. All others dropped that before 1970. --- cache.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cache.h') diff --git a/cache.h b/cache.h index aca98f3ec..e27429eae 100644 --- a/cache.h +++ b/cache.h @@ -148,6 +148,9 @@ extern void *read_object_with_reference(const unsigned char *sha1, unsigned long *size, unsigned char *sha1_ret); +void parse_date(char *date, char *buf, int bufsize); +void datestamp(char *buf, int bufsize); + static inline void *xmalloc(int size) { void *ret = malloc(size); -- cgit v1.2.1