linux 下time函数

Linux下Time相关函数

1、MKTIME

  struct tm {
               int tm_sec;         /* seconds */
               int tm_min;         /* minutes */
               int tm_hour;        /* hours */
               int tm_mday;        /* day of the month */
               int tm_mon;         /* month */
               int tm_year;        /* year */
               int tm_wday;        /* day of the week */
               int tm_yday;        /* day in the year */
               int tm_isdst;       /* daylight saving time */
           };
           
//int tm_sec 代表目前秒数,正常范围为0-59,但允许至61秒
//int tm_min 代表目前分数,范围0-59
//int tm_hour 从午夜算起的时数,范围为0-23
//int tm_mday 目前月份的日数,范围01-31
//int tm_mon 代表目前月份,从一月算起,范围从0-11
//int tm_year 从1900 年算起至今的年数
//int tm_wday 一星期的日数,从星期一算起,范围为0-6
//int tm_yday 从今年1月1日算起至今的天数,范围为0-365
//int tm_isdst 日光节约时间的旗标

2、time
3、ctime
4、localtime
5、date

https://www.cnblogs.com/wenqiang/p/5678451.html

https://blog.csdn.net/weixin_30900589/article/details/97729890

https://www.runoob.com/cprogramming/c-standard-library-time-h.html

https://blog.csdn.net/hmxz2nn/article/details/77986450?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-4.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-4.channel_param

https://blog.csdn.net/wangluojisuan/article/details/7045592?utm_medium=distribute.pc_relevant.none-task-blog-title-3&spm=1001.2101.3001.4242

https://blog.csdn.net/qq_31798135/article/details/103020175?utm_medium=distribute.pc_relevant.none-task-blog-title-2&spm=1001.2101.3001.4242

posted @ 2019-10-15 18:00  hostid  阅读(527)  评论(0编辑  收藏  举报