This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Time differences between USB - HD


Angelo Graziosi wrote
> Just now we are back to Standard Time, I noticed that the files on USB
> key have timestamps +1 hour, compared to the same on HD.
> 
> This happens only under Cygwin: there is not difference under DOS box.
> 

This is "normal" if the filesystems differ between HD (NTFS) and USB key
(FAT?). NTFS stores file times as UTC, FAT as local time.

The problem is the interesting design (IMO this is a bug:-) of the Win32
file time conversion functions:

http://msdn.microsoft.com/en-us/library/ms724277(VS.85).aspx
http://www.codeproject.com/KB/datetime/dstbugs.aspx
http://support.microsoft.com/kb/158588

The difference between Cygwin and other apps occur because Cygwin uses
its own (correct) UTC->localtime conversion but apps like explorer and
cmd uses the (broken) conversion from Win32 API.

Example: http://sourceware.org/ml/cygwin/2007-06/msg00455.html


Christian




--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]