#41786 [Opn]: Setting lastmodified file time with touch gives unexpexted values
| From: | sniper@php.net | Date: | Sun, 24 Jun 2007 13:13:41 +0000 |
| Subject: | #41786 [Opn]: Setting lastmodified file time with touch gives unexpexted values | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-114115@lists.php.net to get a copy of this message | ||
ID: 41786
Updated by: sniper@php.net
Reported By: thbley at gmail dot com
Status: Open
Bug Type: Date/time related
Operating System: WinXP SP2
PHP Version: 5.2.3
New Comment:
See also bug #41751
Previous Comments:
------------------------------------------------------------------------
[2007-06-24 07:21:47] thbley at gmail dot com
Description:
------------
When I try to set the last modified time of two files to the same
value, I get different values.
Date configuration:
(php default, nothing changed, I'm living in Europe/Berlin)
date
date/time support enabled
Timezone Database Version 2006.16
Timezone Database internal
Default timezone Europe/Paris
Directive Local Value Master Value
date.default_latitude 31.7667 31.7667
date.default_longitude 35.2333 35.2333
date.sunrise_zenith 90.583333 90.583333
date.sunset_zenith 90.583333 90.583333
date.timezone no value no value
Reproduce code:
---------------
<?php
// same result with date_default_timezone_set("Europe/Berlin");
touch("c:/test1.txt",strtotime("02/18/2007 20:00:00"));
touch("c:/test2.txt",filemtime("c:/test1.txt"));
echo filemtime("c:/test1.txt")."<br>\n";
echo filemtime("c:/test2.txt")."<br>\n";
echo date("d.m.Y H:i:s",filemtime("c:/test1.txt"))."<br>\n";
echo date("d.m.Y H:i:s",filemtime("c:/test2.txt"))."<br>\n";
?>
Expected result:
----------------
1171818000
1171818000
18.02.2007 18:00:00
18.02.2007 18:00:00
or
1171821600
1171821600
18.02.2007 19:00:00
18.02.2007 19:00:00
Actual result:
--------------
1171821600
1171818000
18.02.2007 19:00:00
18.02.2007 18:00:00
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41786&edit=1