X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fnotify_email.c;h=a13b1f9ea485478565287c1a9223bf34868cfcdd;hb=a5177bd853eedbe69d87869316093a0e9526e931;hp=62e1c486a3601f20db464b1e2083d96cc46544d3;hpb=d6e55d065c568b599a9c27b2540c7e0233cf2318;p=collectd.git diff --git a/src/notify_email.c b/src/notify_email.c index 62e1c486..a13b1f9e 100644 --- a/src/notify_email.c +++ b/src/notify_email.c @@ -208,6 +208,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]; @@ -227,7 +228,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';