社区
Linux/Unix社区
帖子详情
how to get system date in C?
stone612
2003-11-13 10:44:42
In linux,how to get system date use C language.waiting online.thanks !
...全文
28
4
打赏
收藏
how to get system date in C?
In linux,how to get system date use C language.waiting online.thanks !
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
liuty2006
2003-11-20
打赏
举报
回复
mk
wildhorseych
2003-11-13
打赏
举报
回复
关于时间函数
#include <time.h>
time_t tmpTime;
time(&tmpTime);
struct tm* tmPtr;
tmPtr=gmtime(&tmpTime);
然后你就可以引用tmPtr的各个字段了
它的各个字段如下:
tm_sec 秒0-61
tm_min 分0-59
tm_hour 小时0-23
tm_mday 月份中的日期1-31
tm_mon 年份中的月份1-12
tm_year 从1900年开始的年份数
tm_wday 星期几0-6
tm_uday 年份中的日期0-365
tm_isdst 是否为夏日制
linaxing
2003-11-13
打赏
举报
回复
time()
ctime()
localtime()
gmtime()
asctime()
具体看man帮助。
stone612
2003-11-13
打赏
举报
回复
多谢各位前辈
Beginning iOS 7 Development: Exploring the iOS SDK
The confusing art of table building will be demystified, and you’ll learn how to save your data using the iPhone file system. You’ll also learn how to save and retrieve your data using a variety of...
Soft.Skills.The.software.developers.life.manual
A Taking Action section at the end of each chapter shows you how to get quick results. Soft Skills will help make you a better programmer, a more valuable employee, and a happier, healthier person. ...
How to get current
Date
and Time in Java
How to get current
Date
and Time in Java In this article, you’ll find several examples to get the current
date
, current time, current
date
& time, current
date
& time in a specific timezone ...
How To Get System Info In Linux
http://www.computerbob.com/guests/how_to_get_system_info_in_linux.php
Java – How to get current
date
time
Java – How to get current
date
time 1. Code SnippetsFor java.util.
Date
, just create a new
Date
()
Date
Format
date
Format = new Simple
Date
Format("yyyy/MM/dd HH:mm:ss");
Date
date
= new
Date
()...
Linux/Unix社区
23,121
社区成员
74,508
社区内容
发帖
与我相关
我的任务
Linux/Unix社区
Linux/Unix社区 应用程序开发区
复制链接
扫一扫
分享
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章