#include <time.h>
//例如:1589541757 "%Y/%#m/%#d %#H:%#M:%#S" 对应的是 "2020/5/15 19:22:37"
void timeformat(char* buf, int len,char* format, time_t timestamp)
{
strftime(buf, len, format, localtime(×tamp));
}
#include <time.h>
//例如:1589541757 "%Y/%#m/%#d %#H:%#M:%#S" 对应的是 "2020/5/15 19:22:37"
void timeformat(char* buf, int len,char* format, time_t timestamp)
{
strftime(buf, len, format, localtime(×tamp));
}