Hello Thomas,

On Thu, 19 May 2011 23:37:48 +0200
"Thomas Preud'homme" <robo...@celest.fr> wrote:

> Le jeudi 19 mai 2011 22:21:16, Jörg Schütter a écrit :
> > Hello Thomas,
> 
> Hello Jörg,
> > 
> [SNIP]
> > 
> > Looks like it also happens with small files. Since it doesn't
> > take so long to copy them, I never detected this.
> > 
[SNIP]
> 
> This is very valuable information, thanks. So I checked and I can say python 
> (at least python 2.6) return modification and access time precised at the 
> second, not more. This is true even if stat_float_times returns true (which 
> is 
> the default on python >= 2.5).
> 
> So for me the bug is in python. I will try to submit (if no bug report 
> already 
> exist) a bug report on this issue and in the mean time I will add a note in 
> the man that resolution of access/modification time is the second.
> 
> Note that the differents OS could be treated separately and use real system 
> call (via subprocess or the like) to get the time as given by the OS but it 
> would be bad for portability and rather overkill for just gaining nanosecond 
> precision. Also, it would benefit much more people to solve this in python.
> 
> Does this solution sounds fine to you (more documentation + bug forwarding)?

More tests today (in combination with "test FILE1 -nt FILE2")
showed that a file is not newer if it's less than 1 second newer.
If it's exactly 1 second newer, the "test -nt" returns true. So
cutting the milliseconds off is ok (at least for this test tool).

Example:
if [ -f ${source} -a ${source} -nt ${destination} ]; then ...

More tests (using the big file):
-rw-r--r-- 1 joerg joerg 1619558400 2011-04-13 18:01:29.000000000 +0200 
/home/joerg/gps/Legend_MapData/geoclub/gmapsupp.img

Copy it to the same ext4 partition --> same timestamp
Copy it to an ext2 partition (USB) --> same timestamp
Copy it to a vfat partition (USB) --> same timestamp
Copy it to a vfat partition (USB) on Garmin GPS --> different timestamp

I guess the cause is located deeper in the system:
In case of time-diff the used USB mode was ohci_hcd.
The other USB connections (with correct timestamp) used ehci_hcd.

This Garmin GPS is the only "legacy" system I own which uses ohci_hcd.

Cheers
  Joerg



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to