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


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.

Attachment: cygcheck_-svr-root.out.bz2
Description: Binary data

--
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]