Update timestamp to include date

stable-0.4
Craig Robbins 2015-03-25 02:29:24 +10:00
parent 7851c4f7a2
commit 2641fcc4bb
1 changed files with 2 additions and 2 deletions

View File

@ -54,8 +54,8 @@ inline std::string getTimestamp()
// This is not really thread-safe but it won't break anything // This is not really thread-safe but it won't break anything
// except its own output, so just go with it. // except its own output, so just go with it.
struct tm *tm = localtime(&t); struct tm *tm = localtime(&t);
char cs[20]; char cs[20]; //YYYY-MM-DD HH:MM:SS + '\0'
strftime(cs, 20, "%H:%M:%S", tm); strftime(cs, 20, "%Y-%m-%d %H:%M:%S", tm);
return cs; return cs;
} }