note 37151 rejected from function.date by nathan

From: Date: Wed, 05 Nov 2003 02:34:32 +0000
Subject: note 37151 rejected from function.date by nathan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-59919@lists.php.net to get a copy of this message
Note Submitter: danielc@analysisandsolutions.com ---- date('T') doesn't work under Windows during Daylight times. It always returns "BST." <?php echo 'Local: dT='.date('T') . ' dO='.date('O') . ' sZ='.strftime('%Z'); echo "\n<br />"; putenv('TZ=PST8PDT'); echo 'PST8PDT: dT='.date('T') . ' dO='.date('O') . ' sZ='.strftime('%Z'); echo "\n<br />"; putenv('TZ=MST-3MDT'); echo 'MST-3MDT: dT='.date('T') . ' dO='.date('O') . ' sZ='.strftime('%Z'); echo "\n<br />"; putenv('TZ=GMT'); echo 'GMT: dT='.date('T') . ' dO='.date('O') . ' sZ='.strftime('%Z'); ?> OUTPUT DURING EASTERN DAYLIGHT TIME ----------------------------------- Local: dT=BST dO=-0400 sZ=Eastern Daylight Time PST8PDT: dT=BST dO=-0700 sZ=PDT MST-3MDT: dT=BST dO=+0400 sZ=MDT GMT: dT=GMT dO=+0000 sZ=GMT OUTPUT DURING EASTERN STANDARD TIME ----------------------------------- Local: dT=Eastern Standard Time dO=-0500 sZ=Eastern Standard Time PST8PDT: dT=PST dO=-0800 sZ=PST MST-3MDT: dT=MST dO=+0300 sZ=MST GMT: dT=GMT dO=+0000 sZ=GMT

« previous php.notes (#59919) next »