ctime() -将秒转换成日期和时间
头文件
#include <time.h>
函数
char * asctime(const struct tm * tm );
char * asctime_r(const struct tm * tm ,char * buf );
char * ctime(const time_t * timep );
char * ctime_r(const time_t * timep ,char * buf );
struct tm * gmtime(const time_t * timep );
struct tm * gmtime_r(const time_t * timep ,struct tm * result );
struct tm * localtime(const time_t * timep );
struct tm * localtime_r(const time_t * timep ,struct tm * result );
time_t mktime(struct tm * tm );
struct tm {
int tm_sec; / 秒(0-60) /
int tm_min; / 分钟(0-59) /
int tm_hour; / 小时(0-23) /
int tm_mday; / 每