diff options
author | Junio C Hamano <gitster@pobox.com> | 2007-06-07 02:43:24 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-06-07 02:43:24 +0400 |
commit | d44c782bbd6b0e806e056f9e8ff8cd8e426e67a3 (patch) | |
tree | ca47f19971689badb2b644d038a72f4b0d9d8f13 /date.c | |
parent | f07dfbad29d473b35b5fecebf4baf77e32c7f97f (diff) | |
parent | e2ac7cb5fbcf1407003aa07cdcd14141527ea2e3 (diff) |
Merge branch 'sv/objfixes'
* sv/objfixes:
Don't assume tree entries that are not dirs are blobs
git-cvsimport: Make sure to use $git_dir always instead of .git sometimes
fix documentation of unpack-objects -n
Accept dates before 2000/01/01 when specified as seconds since the epoch
Diffstat (limited to 'date.c')
-rw-r--r-- | date.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -414,9 +414,11 @@ static int match_digit(const char *date, struct tm *tm, int *offset, int *tm_gmt num = strtoul(date, &end, 10); /* - * Seconds since 1970? We trigger on that for anything after Jan 1, 2000 + * Seconds since 1970? We trigger on that for any numbers with + * more than 8 digits. This is because we don't want to rule out + * numbers like 20070606 as a YYYYMMDD date. */ - if (num > 946684800) { + if (num >= 100000000) { time_t time = num; if (gmtime_r(&time, tm)) { *tm_gmt = 1; |