|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-06-20 21:28 UTC] aeolianmeson at blitzeclipse dot com
Description:
------------
Touch appears to always apply a timestamp that is exactly one-hour earlier then the given timestamp, in Windows. It appears to work fine in PHP 5.0.4 and 4.1.2 in Linux.
Reproduce code:
---------------
touch('b', 0);
var_dump(stat('b'));
Expected result:
----------------
array(26) {
[0]=>
int(2)
[1]=>
int(0)
[2]=>
int(33206)
[3]=>
int(1)
[4]=>
int(0)
[5]=>
int(0)
[6]=>
int(2)
[7]=>
int(0)
[8]=>
int(-3600)
[9]=>
int(-3600)
[10]=>
int(1182374129)
[11]=>
int(-1)
[12]=>
int(-1)
["dev"]=>
int(2)
["ino"]=>
int(0)
["mode"]=>
int(33206)
["nlink"]=>
int(1)
["uid"]=>
int(0)
["gid"]=>
int(0)
["rdev"]=>
int(2)
["size"]=>
int(0)
["atime"]=>
int(0)
["mtime"]=>
int(0)
["ctime"]=>
int(1182374129)
["blksize"]=>
int(-1)
["blocks"]=>
int(-1)
}
Actual result:
--------------
// mtime and ctime are -3600.
array(26) {
[0]=>
int(2)
[1]=>
int(0)
[2]=>
int(33206)
[3]=>
int(1)
[4]=>
int(0)
[5]=>
int(0)
[6]=>
int(2)
[7]=>
int(0)
[8]=>
int(-3600)
[9]=>
int(-3600)
[10]=>
int(1182374129)
[11]=>
int(-1)
[12]=>
int(-1)
["dev"]=>
int(2)
["ino"]=>
int(0)
["mode"]=>
int(33206)
["nlink"]=>
int(1)
["uid"]=>
int(0)
["gid"]=>
int(0)
["rdev"]=>
int(2)
["size"]=>
int(0)
["atime"]=>
int(-3600)
["mtime"]=>
int(-3600)
["ctime"]=>
int(1182374129)
["blksize"]=>
int(-1)
["blocks"]=>
int(-1)
}
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 21 04:00:02 2025 UTC |
What does this output for you: <?php echo time(), "\n"; touch('b'); // 2nd parameter is optional.. $b = stat('b'); echo $b['ctime'], "\n"; ?>