X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fnotify_email.c;h=cd216ca2da753a2e1a2895486f706c62c280e42d;hb=483e801902bca3c779793224eddf3bb2749d7288;hp=6b4678a7882a22baa010a569ba06cf1e7993ab6b;hpb=6c4ad411cc83a68086bebc24e814c3aea1cb8096;p=collectd.git diff --git a/src/notify_email.c b/src/notify_email.c index 6b4678a7..cd216ca2 100644 --- a/src/notify_email.c +++ b/src/notify_email.c @@ -229,6 +229,7 @@ static int notify_email_notification (const notification_t *n, user_data_t __attribute__((unused)) *user_data) { + time_t tt; struct tm timestamp_tm; char timestamp_str[64]; @@ -248,7 +249,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';