30 static const char Days[12] =
32 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
37 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334
62 int hour,
int min,
int sec )
69 assert(
sizeof( time_t ) >= 4 );
71 if (
sizeof( time_t ) == 4 )
77 if ( year < 70 || year > 137 )
81 if (
sizeof( time_t ) == 8 )
102 while ( day >=
Days[month] )
104 if ( !( year & 3 ) && ( month == 1 ) )
125 leaps = ( year + 2 ) / 4;
127 if ( !( ( year + 70 ) & 3 ) && ( month < 2 ) )
130 days = year * 365L + leaps +
YDays[month] + day;
132 secs = days * 86400L + hour * 3600L + min * 60L + sec;
time_t mbg_mktime(int year, int month, int day, int hour, int min, int sec)
Compute a linear time_t value from broken down date and time.
static const char Days[12]