php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78430 touch() with timestamp not setting "last modified" date
Submitted: 2019-08-20 15:53 UTC Modified: 2019-08-20 16:07 UTC
From: t dot steufmehl at enfokus dot de Assigned: cmb (profile)
Status: Duplicate Package: Filesystem function related
PHP Version: 7.3.8 OS: Windows Server 2012
Private report: No CVE-ID: None
 [2019-08-20 15:53 UTC] t dot steufmehl at enfokus dot de
Description:
------------
When calling touch() with a timestamp on Windows Server 2012 with IIS 8 (using "php-cgi.exe" of "php-7.3.8-nts-Win32-VC15-x86"), the generated file does not have a "last modified" date.

- When executing the test script through CLI ("php.exe"), the "last modified" date of the file is being set properly.
- When calling touch() without a timestamp, the "last modified" date is properly being set to the current datetime.
- With php 7.3.6 ("php-7.3.6-nts-Win32-VC15-x86") it works as expected.

Test script:
---------------
<?php
touch('test.txt', time() + (60 * 60));

Expected result:
----------------
The file "test.txt" should have a last modified date that is one hour in the future.

Actual result:
--------------
The file "test.txt" does not have a last modified date.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-08-20 16:07 UTC] cmb@php.net
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2019-08-20 16:07 UTC] cmb@php.net
This is a duplicate of bug #78381 (bug will be fixed in PHP 7.3.9).
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Dec 06 08:01:24 2019 UTC