note 66175 added to function.stat

From: Date: Tue, 16 May 2006 17:10:43 +0000
Subject: note 66175 added to function.stat
Groups: php.notes 
Request: Send a blank email to php-notes+get-111392@lists.php.net to get a copy of this message
Re note posted by "admin at smitelli dot com" I'm not sure how that can work all year round since you have to modify both opposing inside and outside DST based on the actual files themselves, as well as the current DST setting for the system. e.g. using filemtime, same thing for stat. <?php $mtime = filemtime($file); if (date('I') == 1) { // Win DST is enabled, adjust standard time // files back to 'real' file UTC. if (date('I', $mtime) == 0) { $mtime -= 3600; } } else { // Win DST is disabled, adjust daylight time // files forward to 'real' file UTC. if (date('I', $mtime) == 1) { $mtime += 3600; } } echo gmdate('Y-m-d H:i:s', $mtime); ?> Just another example of why 'not' to use windows in a server room. ---- Server IP: 64.71.164.2 Probable Submitter: 12.27.46.130 (proxied: 12.27.46.140) ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.stat.php Edit -- http://master.php.net/note/edit/66175 Del: integrated -- http://master.php.net/note/delete/66175/integrated Del: useless -- http://master.php.net/note/delete/66175/useless Del: bad code -- http://master.php.net/note/delete/66175/bad+code Del: spam -- http://master.php.net/note/delete/66175/spam Del: non-english -- http://master.php.net/note/delete/66175/non-english Del: in docs -- http://master.php.net/note/delete/66175/in+docs Del: other reasons-- http://master.php.net/note/delete/66175 Reject -- http://master.php.net/note/reject/66175 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#111392) next »