Explorar o código

* Use synced time for log timestamps

Bryan Drewery %!s(int64=16) %!d(string=hai) anos
pai
achega
27b190034a
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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 */