programming.nbk: Home | Index | Next Page: struct tm* gmtime(const time_t* timer); | Previous Page: strtoul(const char *str, char **endptr, int base)


 struct tm

Time structure

Structure containing a calendar date and time broken down into its components.

The structure contains nine members of type int, which are (in any order):

    int tm_sec;
    int tm_min;
    int tm_hour;
    int tm_mday;
    int tm_mon;
    int tm_year;
    int tm_wday;
    int tm_yday;
    int tm_isdst;

The meaning of each is:

    Member      Meaning                     Range 
    tm_sec      seconds after the minute    0-61* 
    tm_min      minutes after the hour      0-59 
    tm_hour     hours since midnight        0-23 
    tm_mday     day of the month            1-31 
    tm_mon      months since January        0-11 
    tm_year     years since 1900  
    tm_wday     days since Sunday           0-6 
    tm_yday     days since January 1        0-365 
    tm_isdst    Daylight Saving Time flag  

The Daylight Saving Time flag (tm_isdst) is greater than zero if Daylight Saving Time is in effect, zero if Daylight Saving Time is not in effect, and less than zero if the information is not available.


programming.nbk: Home | Index | Next Page: struct tm* gmtime(const time_t* timer); | Previous Page: strtoul(const char *str, char **endptr, int base)


Notebook exported on Monday, 7 July 2008, 18:56:06 PM Eastern Daylight Time