X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fnotify_email.c;h=da6894a3db4dc8d0de24fbde2408ff03f194f47a;hb=83077c18c3e78739c2d2d18debf99875944eaa72;hp=0aed27f12bb2ac8b41b5fa4e80d586e0c71f8bca;hpb=053bea810096f410d3b03ade7ef761da05565a45;p=collectd.git diff --git a/src/notify_email.c b/src/notify_email.c index 0aed27f1..da6894a3 100644 --- a/src/notify_email.c +++ b/src/notify_email.c @@ -230,6 +230,7 @@ static int notify_email_notification (const notification_t *n, { smtp_recipient_t recipient; + time_t tt; struct tm timestamp_tm; char timestamp_str[64]; @@ -249,7 +250,8 @@ static int notify_email_notification (const notification_t *n, (email_subject == NULL) ? DEFAULT_SMTP_SUBJECT : email_subject, severity, n->host); - localtime_r (&n->time, ×tamp_tm); + tt = CDTIME_T_TO_TIME_T (n->time); + localtime_r (&tt, ×tamp_tm); strftime (timestamp_str, sizeof (timestamp_str), "%Y-%m-%d %H:%M:%S", ×tamp_tm); timestamp_str[sizeof (timestamp_str) - 1] = '\0';