|
|
|
|
|
by shagie
1255 days ago
|
|
That's a direct translation of struct_tm from time.h. External declarations, as well as the tm structure definition, are
contained in the <time.h> include file. The tm structure includes at
least the following fields:
int tm_sec; /∗ seconds (0 - 60) ∗/
int tm_min; /∗ minutes (0 - 59) ∗/
int tm_hour; /∗ hours (0 - 23) ∗/
int tm_mday; /∗ day of month (1 - 31) ∗/
int tm_mon; /∗ month of year (0 - 11) ∗/
int tm_year; /∗ year - 1900 ∗/
int tm_wday; /∗ day of week (Sunday = 0) ∗/
int tm_yday; /∗ day of year (0 - 365) ∗/
int tm_isdst; /∗ is summer time in effect? ∗/
char ∗tm_zone; /∗ abbreviation of timezone name ∗/
long tm_gmtoff; /∗ offset from UTC in seconds ∗/
You'll note that tm_year is years since 1900.While working support at SGI in the late 90s, got a number of support tickets (there was a woman who worked for a government department (NASA?) who was very good at finding them in doing their y2k checks) about dates showing up as `20100`. |
|