X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_50 X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <4AE4E191.3070205@alice.it> References: <4AE4E191 DOT 3070205 AT alice DOT it> Date: Mon, 26 Oct 2009 11:56:54 +0100 Reply-To: "Christian Franke" To: "Cygwin" Subject: Re: Time differences between USB - HD From: "Christian Franke" Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Message-ID: <1N2NFu-08y0tE0@fwd04.aul.t-online.de> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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