Commit a70998f2 a70998f29751320aa5509562f83a1c0240b9ecb7 by Sergey Poznyakoff

(amd_envelope_date): Always convert date to ctime format.

1 parent 8a9e5510
...@@ -1418,13 +1418,14 @@ amd_envelope_date (envelope_t envelope, char *buf, size_t len, ...@@ -1418,13 +1418,14 @@ amd_envelope_date (envelope_t envelope, char *buf, size_t len,
1418 1418
1419 if ((status = message_get_header (msg, &hdr)) != 0) 1419 if ((status = message_get_header (msg, &hdr)) != 0)
1420 return status; 1420 return status;
1421 if (header_aget_value (hdr, MU_HEADER_ENV_DATE, &date)) 1421 if (header_aget_value (hdr, MU_HEADER_ENV_DATE, &date)
1422 && header_aget_value (hdr, MU_HEADER_DELIVERY_DATE, &date))
1423 return MU_ERR_NOENT;
1424 else
1422 { 1425 {
1423 time_t t; 1426 time_t t;
1424 int rc; 1427 int rc;
1425 1428
1426 if (header_aget_value (hdr, MU_HEADER_DELIVERY_DATE, &date))
1427 return MU_ERR_NOENT;
1428 /* Convert to ctime format */ 1429 /* Convert to ctime format */
1429 rc = mu_parse_date (date, &t, NULL); /* FIXME: TZ info is lost */ 1430 rc = mu_parse_date (date, &t, NULL); /* FIXME: TZ info is lost */
1430 free (date); 1431 free (date);
......