c++ 时间戳
#include <stdio.h>
#include <time.h>
int main(void)
{
time_t tick;
struct tm tm;
char s[100];
tick = time(NULL);
tm = *localtime(&tick);
strftime(s, sizeof(s), "%Y-%m-%d %H:%M:%S", &tm);
printf("%d: %s\n", (int)tick, s);
return 0;
}
http://blog.csdn.net/e295166319/article/details/72846760