kernels/linux-2.4.0/fs/fat/misc.c
/* Convert a MS-DOS time/date pair to a UNIX date (seconds since 1 1 70). */
Convert a MS-DOS time/date pair to a UNIX date (seconds since 1 1 70).
Convert a MS - DOS time / date pair to a UNIX date ( seconds since 1 1 70 ) .
int date_dos2unix(unsigned short time,unsigned short date)
{
	int month,year,secs;
	month = ((date >> 5) & 15)-1;
	year = date >> 9;
	secs = (time & 31)*2+60*((time >> 5) & 63)+(time >> 11)*3600+86400*
	    ((date & 31)-1+day_n[month]+(year/4)+year*365-((year & 3) == 0 &&
	    month < 2 ? 1 : 0)+3653);
	secs += sys_tz.tz_minuteswest*60;
	return secs;
}
int date_dos2unix ( unsigned short time , unsigned short date ) { int month , year , secs ; month = ( ( date >> 5 ) & 15 ) - 1 ; year = date >> 9 ; secs = ( time & 31 ) * 2 + 60 * ( ( time >> 5 ) & 63 ) + ( time >> 11 ) * 3600 + 86400 * ( ( date & 31 ) - 1 + day_n [ month ] + ( year / 4 ) + year * 365 - ( ( year & 3 ) == 0 && month < 2 ? 1 : 0 ) + 3653 ) ; secs += sys_tz . tz_minuteswest * 60 ; return secs ; }
Convert a MS-DOS time/date pair to a UNIX date (seconds since 1 1 70).
Convert a MS - DOS time / date pair to a UNIX date ( seconds since 1 1 70 ) .
/* days since 1.1.70 plus 80's leap day */