summaryrefslogtreecommitdiffstats
path: root/from.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>2000-07-07 06:37:28 +0000
committerThomas Roessler <roessler@does-not-exist.org>2000-07-07 06:37:28 +0000
commiteb834e1b117a4fa57a6db766feda31319b120039 (patch)
treeeb92a2b53310bbf4b82f862f372626e8f5d707a4 /from.c
parentf81c6aef361c4518a630fede797ac5e60f906bed (diff)
Fix #185: is_from would return 0 (i.e., error) when parsing Jan 1
1970 12:00 - apparently, this point of time occurs on real mail folders.
Diffstat (limited to 'from.c')
-rw-r--r--from.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/from.c b/from.c
index 0d8407b8..41d0a6a7 100644
--- a/from.c
+++ b/from.c
@@ -57,7 +57,7 @@ static int is_day_name (const char *s)
* From [ <return-path> ] <weekday> <month> <day> <time> [ <timezone> ] <year>
*/
-time_t is_from (const char *s, char *path, size_t pathlen)
+int is_from (const char *s, char *path, size_t pathlen, time_t *tp)
{
struct tm tm;
int yr;
@@ -178,5 +178,6 @@ time_t is_from (const char *s, char *path, size_t pathlen)
tm.tm_isdst = -1;
- return (mutt_mktime (&tm, 0));
+ if (tp) *tp = mutt_mktime (&tm, 0);
+ return 1;
}