6 const int month_len[12] =
8 2678400, 2419200, 2678400, 2592000, 2678400, 2592000,
9 2678400, 2678400, 2592000, 2678400, 2592000, 2678400
18 gettimeofday( &tv,
NULL );
19 secs = tv.tv_sec % 86400;
21 for( i = 1970; i < y; i++ ) {
22 tv.tv_sec += 31536000;
23 if( ((i % 4) == 0) || ((i / 400) == 0) )
26 tv.tv_sec += (m * month_len[m-1]);
27 if( ((y % 4) == 0) || ((y / 400) == 0) )
29 tv.tv_sec += (d * 86400) + secs;
30 if( settimeofday( &tv,
NULL ) )