Bug #78381 [NEW]: touch() with time-params does not set file modification date on Windows
| From: | andrey dot sperkach at gmail dot com | Date: | Tue, 06 Aug 2019 12:42:25 +0000 |
| Subject: | Bug #78381 [NEW]: touch() with time-params does not set file modification date on Windows | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-222101@lists.php.net to get a copy of this message | ||
From: andrey dot sperkach at gmail dot com
Operating system: Windows 10
PHP version: 7.3.8
Package: *Directory/Filesystem functions
Bug Type: Bug
Bug description:touch() with time-params does not set file modification date on Windows
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 bug report at https://bugs.php.net/bug.php?id=78381&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=78381&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=78381&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=78381&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=78381&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=78381&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=78381&r=support
Expected behavior: https://bugs.php.net/fix.php?id=78381&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=78381&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=78381&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=78381&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=78381&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=78381&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=78381&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=78381&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78381&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=78381&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=78381&r=mysqlcfg