note 97194 added to function.filemtime

From: Date: Wed, 07 Apr 2010 19:22:53 +0000
Subject: note 97194 added to function.filemtime
Groups: php.notes 
Request: Send a blank email to php-notes+get-167971@lists.php.net to get a copy of this message
Also on 32-bit systems, filemtime() also does not work for files with modification time set beyond Jan 2038. It is the dreaded time_t overflow bug for unix seconds. On windows you can set the system time to any arbitrary future date, and any new files you created or edited will automatically change to that future date. If exec isn't permitted for some reason, and if you could access the file via an web url (e.g. http://localhost/yourfile.txt), another workaround is to get the Last-Modified time from the HTTP headers (e.g. get_headers(url) ), and parse it as a DateTime object. I have tested it and it works for years like 2050 and 3012. ---- Server IP: 66.207.199.35 Probable Submitter: 70.54.236.172 ---- Manual Page -- http://www.php.net/manual/en/function.filemtime.php Edit -- https://master.php.net/note/edit/97194 Del: integrated -- https://master.php.net/note/delete/97194/integrated Del: useless -- https://master.php.net/note/delete/97194/useless Del: bad code -- https://master.php.net/note/delete/97194/bad+code Del: spam -- https://master.php.net/note/delete/97194/spam Del: non-english -- https://master.php.net/note/delete/97194/non-english Del: in docs -- https://master.php.net/note/delete/97194/in+docs Del: other reasons-- https://master.php.net/note/delete/97194 Reject -- https://master.php.net/note/reject/97194 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#167971) next »