中国开发网: 论坛: 程序员情感CBD: 贴子 63155
haitao
struct tm
#ifndef _TM_DEFINED
struct tm {
int tm_sec; /* seconds after the minute - [0,59] */
int tm_min; /* minutes after the hour - [0,59] */
int tm_hour; /* hours since midnight - [0,23] */
int tm_mday; /* day of the month - [1,31] */
int tm_mon; /* months since January - [0,11] */
int tm_year; /* years since 1900 */
int tm_wday; /* days since Sunday - [0,6] */
int tm_yday; /* days since January 1 - [0,365] */
int tm_isdst; /* daylight savings time flag */
};
#define _TM_DEFINED
#endif
似乎可以利用它分解时分秒(但是也没有毫秒),但不知道是否liunx也支持

下面似乎只是win系统的文件头里的时间的存储格式
32-bit Windows Time/Date Formats
Remarks

The file time and the date are stored individually, using unsigned integers as bit fields. File time and date are packed as follows:

Time

Bit Position: 0 1 2 3 4 5 6 7 8 9 A B C D E F
Length: 5 6 5
Contents: hours minutes 2-second increments
Value Range: 0–23 0–59 0–29 in 2-second intervals


Date

Bit Position: 0 1 2 3 4 5 6 7 8 9 A B C D E F
Length: 7 4 5
Contents: year month day
Value Range: 0–119 1–12 1–31
(relative to 1980)
我的blog:http://szhaitao.blog.hexun.com & http://www.hoolee.com/user/haitao
--以上均为泛泛之谈--
不尽牛人滚滚来,无边硬伤纷纷现 人在江湖(出来的),哪能不挨刀(总归是要的)
网络对话,歧义纷生;你以为明白了对方的话,其实呢?

您所在的IP暂时不能使用低版本的QQ,请到:http://im.qq.com/下载安装最新版的QQ,感谢您对QQ的支持和使用

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录