[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.
This commit is contained in:
Edgar Toernig
2005-04-30 09:46:49 -07:00
committed by Linus Torvalds
parent d167f147dc
commit ecee9d9e79
4 changed files with 191 additions and 27 deletions

View File

@ -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);