ID:               45414
 Updated by:       [EMAIL PROTECTED]
 Reported By:      marcello at vezz dot it
-Status:           Open
+Status:           Bogus
 Bug Type:         Filesystem function related
 Operating System: Windows XP
 PHP Version:      5.2.6
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Bug #40568 is not bogus or closed, it's suspended..


Previous Comments:
------------------------------------------------------------------------

[2008-07-02 09:58:49] marcello at vezz dot it

Description:
------------
I quote from Bug #40568:

PHP filemtime/fileatime/filectime (and maybe stat itself) functions
should use GetFileTime() Win32API (or GetFileAttributesEx()), not
stat() to retrieve the actual times from files. Otherwise the returned
time is shifted by one hour in some conditions.

This (mis)behaviour is actually DOCUMENTED by Microsoft, so it does not
qualify for "bogus - fix microsoft libraries" bug rejection -- Microsoft
already fixed their documentation and even indicated that "This behavior
is by design."

References:
http://support.microsoft.com/kb/158588
http://support.microsoft.com/kb/190315
http://msdn2.microsoft.com/en-gb/library/ms724290.aspx
http://us3.php.net/manual/en/function.stat.php#58404
http://www.codeproject.com/datetime/dstbugs.asp

Reproduce code:
---------------
<?php
  $fullfilename='test.dll';
  $ft=filemtime($fullfilename);
  touch($fullfilename.'.md5',$ft);
  $nt=filemtime($fullfilename.'.md5');
  echo $ft.' : '.$nt;
?>

Please get test.dll from http://www.vezz.it/php/test.zip

Original file modification date:
19 feb 2008, 19.08.47

Expected result:
----------------
filemtime should return the same result for the two files.

1203440927 : 1203440927 



Actual result:
--------------
1203440927 : 1203437327

The touched file date is one hour back.
19 feb 2008, 18.08.47 instead of 19 feb 2008, 19.08.47


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


-- 
Edit this bug report at http://bugs.php.net/?id=45414&edit=1

Reply via email to