mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-01-24 10:30:00 +01:00
If the Date: field contains some garbage return the current timestamp
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
3bb6b401a1
commit
13b10d5f3d
@ -263,6 +263,18 @@ time_t parse_date_header(char *datestr){
|
|||||||
|
|
||||||
ts += get_local_timezone_offset() - offset;
|
ts += get_local_timezone_offset() - offset;
|
||||||
|
|
||||||
|
if(ts < 700000000){
|
||||||
|
// If the Date: field contains some garbage, eg.
|
||||||
|
// "Date: [mail_datw]" or similar, and the date
|
||||||
|
// is before Sat Mar 7 20:26:40 UTC 1992, then
|
||||||
|
// return the current timestamp
|
||||||
|
|
||||||
|
time_t now;
|
||||||
|
time(&now);
|
||||||
|
|
||||||
|
return now;
|
||||||
|
}
|
||||||
|
|
||||||
return ts;
|
return ts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user