summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e0571c4)
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
{
struct tm tm;
const char *loc;
{
struct tm tm;
const char *loc;
loc = setlocale(LC_TIME, "C");
loc = setlocale(LC_TIME, "C");
- s = strptime(s, "%a, %d %b %Y %T %z", &tm);
+
+ p_clear(&tm, 1);
+ if (strptime(s, "%a, %d %b %Y %H:%M:%S %z", &tm))
+ goto ok;
+ p_clear(&tm, 1);
+ if (strptime(s, "%a, %d %b %Y %H:%M %z", &tm))
+ goto ok;
+ setlocale(LC_TIME, loc);
+ return 0;
+
+ ok:
setlocale(LC_TIME, loc);
return mutt_mktime(&tm, 1);
}
setlocale(LC_TIME, loc);
return mutt_mktime(&tm, 1);
}