Jelajahi Sumber

* Use synced time for log timestamps

Bryan Drewery 16 tahun lalu
induk
melakukan
27b190034a
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  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) {
   if (conf.bot && conf.bot->hub) {
     char stamp[34] = "";
     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);
     strftime(stamp, sizeof(stamp), LOG_TS, t);
     /* Place the timestamp in the string to be printed */
     /* Place the timestamp in the string to be printed */