Bug #78381 [Opn->Fbk]: touch() with time-params does not set file modification date on Windows
| From: | cmb@php.net | Date: | Tue, 06 Aug 2019 13:25:55 +0000 |
| Subject: | Bug #78381 [Opn->Fbk]: touch() with time-params does not set file modification date on Windows | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-222104@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78381&edit=1
ID: 78381
Updated by: cmb@php.net
Reported by: andrey dot sperkach at gmail dot com
Summary: touch() with time-params does not set file
modification date on Windows
-Status: Open
+Status: Feedback
Type: Bug
Package: *Directory/Filesystem functions
Operating System: Windows 10
PHP Version: 7.3.8
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
I'm not able to reproduce the described behavior. Are you working
on a local file system?
Previous Comments:
------------------------------------------------------------------------
[2019-08-06 12:42:25] andrey dot sperkach at gmail dot com
Description:
------------
touch() with time-params does not set file modification date
PHP 7.0.x not affected by this problem
PHP 7.3.8 set it to 1970.01.01 - wrong
BUT:
touch($file) without time-param set modification time to current datetime!
Test script:
---------------
$file = 'test.txt';
$current = file_get_contents($file);
$current = "TEST";
file_put_contents($file, $current);
touch($file,time()+86400);
Expected result:
----------------
modification time = current + 1 day
Actual result:
--------------
modification time = 1970.01.01 3:01:14
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78381&edit=1