ID:               41751
 User updated by:  aeolianmeson at blitzeclipse dot com
 Reported By:      aeolianmeson at blitzeclipse dot com
 Status:           Open
 Bug Type:         *General Issues
 Operating System: Windows XP SP2
 PHP Version:      5.2.3
 New Comment:

Plus, this only happens with Windows.

Dustin


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

[2007-06-20 22:27:45] aeolianmeson at blitzeclipse dot com

It's just easier to see when I use (0). I was using normal timestamps
before.

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

[2007-06-20 22:26:26] [EMAIL PROTECTED]

Actually I think it's just the thing that you pass '0' to touch() as
2nd parameter..

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

[2007-06-20 21:58:56] aeolianmeson at blitzeclipse dot com

1182376591
1182376591

ctime doesn't appear to be afflicted.

Dustin Oprea

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

[2007-06-20 21:53:45] [EMAIL PROTECTED]

What does this output for you:

<?php

echo time(), "\n";
touch('b'); // 2nd parameter is optional..
$b = stat('b');
echo $b['ctime'], "\n";

?>




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

[2007-06-20 21:28:11] 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)
}


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


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

Reply via email to