Skip to content
Permalink
Browse files

Update timestamp to include date

  • Loading branch information
Zeno- committed Mar 24, 2015
1 parent 7851c4f commit 2641fcc4bb9c3fae58e28a2b73921dd1fb419d8a
Showing with 2 additions and 2 deletions.
  1. +2 −2 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;
}

0 comments on commit 2641fcc

Please sign in to comment.