首页 > 其他 > 详细

strftime

时间:2019-12-24 19:06:17      阅读:80      评论:0      收藏:0      [点我收藏+]

 

qi

std::string time_now() {
  time_t t = time(0);
  char tmp[64];
  strftime(tmp, sizeof(time), "%Y%m%dT%H%M%S", localtime(&t));
  return tmp;
}

  

re

1. 

http://www.cplusplus.com/reference/ctime/strftime/

2. 

http://man7.org/linux/man-pages/man3/strftime.3.html

end

strftime

原文:https://www.cnblogs.com/happyamyhope/p/12092808.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!