1
0
Эх сурвалжийг харах

* Use synced time for log timestamps

Bryan Drewery 16 жил өмнө
parent
commit
27b190034a
1 өөрчлөгдсөн 2 нэмэгдсэн , 1 устгасан
  1. 2 1
      src/log.c

+ 2 - 1
src/log.c

@@ -292,7 +292,8 @@ void putlog(int type, const char *chname, const char *format, ...)
 
   if (conf.bot && conf.bot->hub) {
     char stamp[34] = "";
-    struct tm *t = gmtime(&now);
+    time_t synced = now + timesync;
+    struct tm *t = gmtime(&synced);
 
     strftime(stamp, sizeof(stamp), LOG_TS, t);
     /* Place the timestamp in the string to be printed */