lkml.org 
[lkml]   [1997]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateFri, 11 Apr 1997 20:01:10 -0400
FromTom Zerucha <>
SubjectFAT (MSDOS) and Daylight Savings Time fix
You need a complimentary daylight savings time adjustment in unix2dos:

(otherwise emacs complains that the file is always newer)

The if(...} are the 3 lines I added
void fat_date_unix2dos(int unix_date,unsigned short *time,
unsigned short *date)
{
int day,year,nl_day,month;
if (sys_tz.tz_dsttime) {
unix_date += 3600;
}
unix_date -= sys_tz.tz_minuteswest*60;
*time = (unix_date % 60)/2+(((unix_date/60) % 60) << 5)+
(((unix_date/3600) % 24) << 11);


\
 
 \ /
  Last update: 2005-03-22 13:39    [from the cache]
©2003-2010