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成员函数即可
Powered by: 博客园 Copyright © 2024 Phil Wang Powered by .NET 8.0 on Kubernetes