This is the mail archive of the
mailing list for the Cygwin project.
Re: Problem with daylight saving time, off by one hour
On Feb 28 12:23, Frank Farance wrote:
> > Not for me. The only difference I see is that I'm living in another
> > timezone. I changed my timezone to America/New_York as well, but the time
> > is still correct in ls. Without a reproducible scenario (which does not
> > involve non-system, non-Cygwin tools like winSCP) it's pretty hard to
> > track down why you see the wrong time information.
> Corinna, maybe my point wasn't clear above. I mentioned WinSCP to reveal
> how the files arrived. However, it was via ***Windows*** tools where I
> was able to see the timestamp: (1) a right-click->properties on the file
You made your point entirely clear. But I really hope I made my point
as clear as well. In theory it shouldn't matter how the files arrived
on the machine. Still, there is the problem of reproducibility. For
- My Windows timezone is "(UTC+01:00) Amsterdam, Berlin, Bern, Rome,
Stockholm, Vienna", which is +1 from UTC, +2 in DST.
- My C:\Windows folder has a modification timestamp of 2011-07-16 10:15
in a standard Windows Explorer folder view.
- In CMD: dir C:\ prints
16.07.2011 09:15 <DIR> Windows
Note that it does NOT print 10:15!
- In a Cygwin shell:
tcsh$ echo $TZ
tcsh$ cd /cygdrive/c
tcsh$ ls -ld --full-time Windows
drwxrwx---+ 1 ???????? ???????? 0 2011-07-16 10:15:47.190400000 +0200 Windows
So Explorer and Cygwin agree on the time, only CMD is an hour off because
CMD apparently ignores the fact that the file's modification timestamp
is within DST, so it does not add an hour.
Another example involving a cp from a remote machine:
tcsh$ echo $TZ
tcsh$ ls -l --full-time x
-rw-r--r--. 1 corinna vinschen 12849 2007-07-24 16:47:48.000000000 +0200 x
tcsh$ cp -p //linux/share/x .
tcsh$ ls -ld --full-time x
-rw-r--r-- 1 corinna vinschen 12849 2007-07-24 16:47:48.000000000 +0200 x
24.07.2007 15:47 12.849 x
- Windows Explorer shows a timestamp of 2007-07-24 16:47.
Here, too, all affected parties agree on the timestamp, only CMD
doesn't. A change to another Windows timezone only offsets the
timestamps, but doesn't change the general picture.
> shows the correct timestamp, (2) I just tried "dir" from the command line
> and got the right time, (3) but "ls -l --full-time" shows the wrong time
> <-- all reproduced by system or cygwin tools.
Which is kind of weird, because that's *exactly* inverse to what I observe
on my machine.
> FYI, I just tried a different folder that has winter files and all three
> steps above report the same time. This would dispell the idea that I had
> the wrong time zone, right?
Well... probably. What strikes me as weird is the exact opposite behaviour
from what I see. If the file is a DST file, but Explorer and CMD don't
disagree by an hour, what does that mean? That would mean that Explorer
doesn't treat the DST timestamp as DST timestamp for some reason.
> How would you like me to debug this further? Thanks!
I don't know. I can't see that anything's wrong with Cygwin here. I
just searched the web and found other people having timestamp problems
with WinSCP without any Cygwin involvement:
Maybe it *is* winSCP, after all?
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple