1.5.9: fix bad tz correction in email dates + display tz in reslist
This commit is contained in:
parent
7814e0fb0a
commit
ff78e94b2c
@ -1,5 +1,5 @@
|
||||
#ifndef lint
|
||||
static char rcsid[] = "@(#$Id: reslist.cpp,v 1.3 2006-09-29 08:24:16 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||
static char rcsid[] = "@(#$Id: reslist.cpp,v 1.4 2006-11-07 18:28:49 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||
#endif
|
||||
|
||||
#include <time.h>
|
||||
@ -351,7 +351,7 @@ void ResList::resultPageNext()
|
||||
time_t mtime = doc.dmtime.empty() ?
|
||||
atol(doc.fmtime.c_str()) : atol(doc.dmtime.c_str());
|
||||
struct tm *tm = localtime(&mtime);
|
||||
strftime(datebuf, 99, " %Y-%m-%d %H:%M:%S", tm);
|
||||
strftime(datebuf, 99, " %Y-%m-%d %H:%M:%S %z", tm);
|
||||
}
|
||||
|
||||
// Size information. We print both doc and file if they differ a lot
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef lint
|
||||
static char rcsid[] = "@(#$Id: mimeparse.cpp,v 1.14 2006-09-19 14:19:32 dockes Exp $ (C) 2004 J.F.Dockes";
|
||||
static char rcsid[] = "@(#$Id: mimeparse.cpp,v 1.15 2006-11-07 18:28:48 dockes Exp $ (C) 2004 J.F.Dockes";
|
||||
#endif
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -723,7 +723,7 @@ time_t rfc2822DateToUxTime(const string& dt)
|
||||
DATEDEB((stderr, "Tz: [%s] -> %d\n", it->c_str(), zonesecs));
|
||||
nozone:
|
||||
|
||||
time_t tim = mktime(&tm);
|
||||
time_t tim = timegm(&tm);
|
||||
tim += zonesecs;
|
||||
DATEDEB((stderr, "Date: %s uxtime %ld \n", ctime(&tim), tim));
|
||||
return tim;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user