摘要: 一下程序实现从1970/1/1 0:0:0开始的秒数到对应日期的变化比如秒数为1,对应日期1970/1/1 0:0:1源文件:#include "rtc.h"#define SEC_PER_DAY 86400#define SEC_PER_HOUR 3600#define DAY_PER_4YEAR 1461static const int __day_in_leapyear[13] = { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366};static const int __day... 阅读全文
posted @ 2012-04-19 20:58 wulax 阅读(599) 评论(0) 推荐(0) 编辑
摘要: 1 static const int days_per_month_in_leapyear [13] = { 0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; 2 static const int days_per_month_in_commonyear [13] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; 3 // ...... 4 // year,month,day中存储当前日期 5 void UTC2Timezone(lo... 阅读全文
posted @ 2012-04-19 20:51 wulax 阅读(533) 评论(0) 推荐(0) 编辑