diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2017-07-03 14:11:07 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2017-07-03 14:11:07 +0300 |
commit | 0d0ad2f817ca89ad9135ab0497780c08d7671530 (patch) | |
tree | bf4e265ad2f08d87071695c6ff7d84db3a14b03b | |
parent | 7790c66bf2e26a4f34f2b42766d92e6c61f3930d (diff) | |
download | mailutils-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.c | 5 |
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 |