Time differences between USB - HD

Angelo Graziosi angelo.graziosi@alice.it
Mon Oct 26 11:46:00 GMT 2009


Corinna Vinschen wrote:
> On Oct 26 00:38, 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.
>>
>> I am sure I am missing something...
> 
> I just set the clock of my machine back to the day before yesterday,
> created a file on the USB stick and one on the HD.  Then I copied the
> file on the stick to HD and the file on HD to the stick.  Afterwards I
> stopped my Cygwin shell, reverted the dat to today, and restarted the
> Cygwin shell.  The dates are still the same on stick and HD.

I have followed your tests founding different results if I reboot the 
machine!

Without rebooting, the dates are still the same on stick (KINGSTON, i.e. 
'D:') and HD (C:)

BEFORE REBOOTING
-----------------------------------------------------------
$ ls -lrt /KINGSTON/
-rw-r--r-- 1 graziosi users        7 24 Oct 11:57 on_USB.txt
-rw-r--r-- 1 graziosi users        6 24 Oct 11:57 on_HD.txt

$ ls -lrt /home/root/
-rw-r--r-- 1 root     root          7 24 Oct 11:57 on_USB.txt
-rw-r--r-- 1 root     root          6 24 Oct 11:57 on_HD.txt

But from DOS box:

dir d:
24/10/2009  10.57                 7 on_USB.txt
24/10/2009  10.57                 6 on_HD.txt

dir C:\cygwin-2\home\root
24/10/2009  10.57                 6 on_HD.txt
24/10/2009  10.57                 7 on_USB.txt
-----------------------------------------------------------

Instead if I reboot, on USB all previous results are increased by 1 hour:

AFTER REBOOTING
-----------------------------------------------------------
$ ls -lrt /KINGSTON/
-rw-r--r-- 1 graziosi users        7 24 Oct 12:57 on_USB.txt
-rw-r--r-- 1 graziosi users        6 24 Oct 12:57 on_HD.txt

 From DOS box:

dir d:
24/10/2009  11.57                 7 on_USB.txt
24/10/2009  11.57                 6 on_HD.txt

-----------------------------------------------------------

> Is $TZ set in your shell, maybe?  Is the HD a locale HD or a remote
> share?

Local HD, and

$ echo $TZ

is empty. But

$ echo $LANG
it

For completeness, also on GNU/Linux Kubuntu 9.04 the old files on stick 
are +1 hour (here $LANG is it_IT.UTF-8).

I have attached cygcheck.

Cheers,
Angelo.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck_-svr-root.out.bz2
Type: application/octet-stream
Size: 11839 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20091026/08e8eb41/attachment.obj>
-------------- next part --------------
--
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


More information about the Cygwin mailing list