1, time_t 转 struct tm
struct tm *localtime( const time_t *timer );
2,struct tm 转 time_t
time_t mktime( struct tm *timeptr );
3,ctime 转 time_t
用ctime类中的gettime成员函数即可
博客园 © 2004-2025 浙公网安备 33010602011771号 浙ICP备2021040463号-3