struct tm *ptr;
    time_t lt;
    unsigned int times=<秒数时间变量>;
    char str[80];
    lt=times;
    ptr=localtime(&lt);
    strftime(str,100,"%F %X",ptr);

摘抄来的,来源忘记了。。。

相关文章:

  • 2021-07-22
  • 2022-12-23
  • 2022-12-23
  • 2021-06-09
  • 2022-12-23
  • 2022-12-23
  • 2021-12-18
  • 2021-12-12
猜你喜欢
  • 2021-09-29
  • 2022-12-23
  • 2022-12-23
  • 2021-12-26
  • 2021-08-21
  • 2022-12-23
  • 2022-02-25
相关资源
相似解决方案