DKIM: support multiple hash methods
[exim.git] / src / src / debug.c
index f6c8b2f62eb7cd61480da828512aa2cb97f44895..09e03f1e499f81a9476a6ce279af089803ed631e 100644 (file)
@@ -188,10 +188,10 @@ if (debug_ptr == debug_buffer)
 
     gettimeofday(&now, NULL);
     tmp = now.tv_sec;
-    t = timestamps_utc ? gmtime(&now) : localtime(&now);
+    t = timestamps_utc ? gmtime(&tmp) : localtime(&tmp);
     debug_ptr += sprintf(CS debug_ptr,
       LOGGING(millisec) ? "%02d:%02d:%02d.%03d " : "%02d:%02d:%02d ",
-      t->tm_hour, t->tm_min, t->tm_sec, now.tv_usec/1000);
+      t->tm_hour, t->tm_min, t->tm_sec, (int)(now.tv_usec/1000));
     }
 
   DEBUG(D_pid)