Bug #15243

Filetime on Windows displays creation and not last modified date

Added by Peter Russ almost 14 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2005-11-29
Due date:
% Done:

0%

TYPO3 Version:
3.8.1
PHP Version:
4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

filectime on Windows displays time when file was created and NOT last modified. So change that to filemtime to get the appropriate value
see http://de3.php.net/manual/en/function.filectime.php

diff u -r1.1 -r1.2
--
t3lib/class.t3lib_basicfilefunc.php 29 Nov 2005 04:42:54 -0000 1.1
+++ t3lib/class.t3lib_basicfilefunc.php 29 Nov 2005 04:48:35 -0000 1.2
@ -27,7 +27,7 @
/** * Contains class with basic file management functions *
- * $Id: class.t3lib_basicfilefunc.php,v 1.1 2005/11/29 04:42:54 pruss Exp $
+ * $Id: class.t3lib_basicfilefunc.php,v 1.2 2005/11/29 04:48:35 pruss Exp $ * Revised for TYPO3 3.6 July/2003 by Kasper Skaarhoj * * author Kasper Skaarhoj <kasperYYYY@typo3.com>
@ 150,7 150,14 @@
function getTotalFileInfo($wholePath) {
$theuser = getmyuid();
$info = t3lib_div::split_fileref($wholePath);
$info['tstamp'] = @filectime($wholePath);
//PRS+ 29.11.2005
+ /*
+ * On Windows filectime gives the time, when the file was created
+ * To get time when file was last modified filemtime is the appropriate function
+ */
# $info['tstamp'] = @filectime($wholePath);
$info['tstamp'] = @filemtime($wholePath);
+ //PRS- 29.11.2005
$info['size'] = @filesize($wholePath);
$info['type'] = @filetype($wholePath);
$info['owner'] = @fileowner($wholePath);

(issue imported from #M1946)

History

#1 Updated by Chris topher over 9 years ago

This issue was solved by Stucki in February 2007; revision 1979:
http://forge.typo3.org/repositories/revision/typo3v4-core/1979

It is fixed in current versions.

Also available in: Atom PDF