[阅读: 1292] 2004-12-13 12:19:58
#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)