summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2017-07-03 14:11:07 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2017-07-03 14:11:07 +0300
commit0d0ad2f817ca89ad9135ab0497780c08d7671530 (patch)
treebf4e265ad2f08d87071695c6ff7d84db3a14b03b
parent7790c66bf2e26a4f34f2b42766d92e6c61f3930d (diff)
downloadmailutils-0d0ad2f817ca89ad9135ab0497780c08d7671530.tar.gz
mailutils-0d0ad2f817ca89ad9135ab0497780c08d7671530.tar.bz2
Bugfix
* libmailutils/address/parse822.c (mu_parse822_date_time): Set tm_yday
-rw-r--r--libmailutils/address/parse822.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libmailutils/address/parse822.c b/libmailutils/address/parse822.c
index 732028930..9a4ef48de 100644
--- a/libmailutils/address/parse822.c
+++ b/libmailutils/address/parse822.c
@@ -1760,7 +1760,7 @@ mu_parse822_time (const char **p, const char *e,
}
#if 0
-For reference, especially the for the required range and values of the
+For reference, especially for the required range and values of the
integer fields.
struct tm
@@ -1844,6 +1844,9 @@ mu_parse822_date_time (const char **p, const char *e, struct tm *tm,
tm->tm_min = min;
tm->tm_sec = sec;
+ tm->tm_yday = mu_datetime_dayofyear (tm->tm_year + 1900,
+ tm->tm_mon + 1, tm->tm_mday) - 1;
+
#ifdef HAVE_STRUCT_TM_TM_ISDST
tm->tm_isdst = -1; /* unknown whether it's dst or not */
#endif

Return to:

Send suggestions and report system problems to the System administrator.