path: root/cache.h
diff options
authorEdgar Toernig <>2005-04-30 16:46:49 (GMT)
committerLinus Torvalds <>2005-04-30 16:46:49 (GMT)
commitecee9d9e793c7573cf3730fb9746527a0a7e94e7 (patch)
tree0cd8a2506a2960a0697fd7aaa2cd0dfc38b1aa67 /cache.h
parentd167f147dc6995e452cdc374ffcd07f5d9abf0bc (diff)
[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.
Diffstat (limited to 'cache.h')
1 files changed, 3 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index aca98f3..e27429e 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);