This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: shutil.copy2 modifies decimal part of last modification time
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: guy-dalberto, loewis
Priority: normal Keywords:

Created on 2007-03-01 19:44 by guy-dalberto, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test_shutil_copy2.py guy-dalberto, 2007-03-01 19:44 Unit Test that prove the bug
Messages (2)
msg31397 - (view) Author: Guy Dalberto (guy-dalberto) Date: 2007-03-01 19:44
Problem on Windows 2000 with Python 2.5.

When copying a file with shutil.copy2,
the last modification times should be copied.

What happens is that :
+ the integer part is copied correctly
+ the decimal part is modified 

+ some samples :
           source-lastmod-time   copy-lastmod-time
  file_0.txt 1172574881.34375 => 1172574881.034375
  file_1.txt 1172574881.46875 => 1172574881.046875

+ what is really odd is that the decimal part is
  divided by 10

The attached file *test_shutil_copy2.py* contains an Unit Test that demonstrate the incorrect behaviour
msg31398 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2007-03-01 21:36
I believe this is a duplicate of #565150; it has been fixed in the maintenance branch.
History
Date User Action Args
2022-04-11 14:56:22adminsetgithub: 44643
2007-03-01 19:44:45guy-dalbertocreate