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成员函数即可

相关文章:

  • 2022-12-23
  • 2022-01-06
  • 2022-03-02
  • 2022-12-23
  • 2021-12-27
  • 2021-12-04
猜你喜欢
  • 2022-12-23
  • 2021-11-22
  • 2022-01-19
  • 2022-02-10
  • 2021-10-29
相关资源
相似解决方案