X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fgettime.h;h=44c1590262290546aa5b5dc2a465936856276f3c;hb=c197e039226db9f154703a424c012615c223a7f6;hp=2a6a211b88b3176850a719a486f7d3f3fb1fdb17;hpb=d1ccc64e1ecfd00df36d2b8a8b3420b70434fefd;p=minetest.git diff --git a/src/gettime.h b/src/gettime.h index 2a6a211b8..44c159026 100644 --- a/src/gettime.h +++ b/src/gettime.h @@ -54,8 +54,8 @@ inline std::string getTimestamp() // This is not really thread-safe but it won't break anything // except its own output, so just go with it. struct tm *tm = localtime(&t); - char cs[20]; - strftime(cs, 20, "%H:%M:%S", tm); + char cs[20]; //YYYY-MM-DD HH:MM:SS + '\0' + strftime(cs, 20, "%Y-%m-%d %H:%M:%S", tm); return cs; }