Golang编程语言知识介绍


  • 首页

  • todo

  • 思考

  • life

  • food

  • OS

  • lua

  • redis

  • Golang

  • C

  • TCP/IP

  • ebpf

  • p4

  • OpenVPN

  • IPSec

  • L2TP

  • DNS

  • distributed

  • web

  • OpenWRT

  • 运维

  • Git

  • 鸟哥的私房菜

  • IT杂谈

  • 投资

  • About Me

  • 友情链接

  • FTP

  • 搜索
close

C语言获取系统时间并转换成字符串

时间: 2022-10-19   |   分类: c     |   阅读: 26 字 ~1分钟
 #include <time.h>
 #include <stdio.h>
 
 int
 main(int argc, char *argv[]) {
   time_t tt = time(0);
   char buf[32] = {0};
   strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", localtime(&tt));
   return 0;
 }
#c#
CMakeLists.txt注释
printf函数输出指定长度
shankusu2017@gmail.com

shankusu2017@gmail.com

日志
分类
标签
GitHub
© 2009 - 2025
粤ICP备2021068940号-1 粤公网安备44011302003059
0%