[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:

committed by
Linus Torvalds

parent
d167f147dc
commit
ecee9d9e79
3
cache.h
3
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);
|
||||
|
Reference in New Issue
Block a user