#include "time.h"
#include "stdio.h"
int main(void)
{
char now[64];
struct tm newtime;
time_t timep;
errno_t err;
timep = 1386691200;
err = localtime_s(&newtime, &timep);
strftime(now, 64, "%Y-%m-%d %H:%M:%S", &newtime);
std::cout<< "the time is " << now << endl;
return 0;
}
#include "stdio.h"
int main(void)
{
char now[64];
struct tm newtime;
time_t timep;
errno_t err;
timep = 1386691200;
err = localtime_s(&newtime, &timep);
strftime(now, 64, "%Y-%m-%d %H:%M:%S", &newtime);
std::cout<< "the time is " << now << endl;
return 0;
}