note 1266 modified in date by ronabop

From: Date: Sat, 10 Mar 2001 22:03:37 +0000
Subject: note 1266 modified in date by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-12194@lists.php.net to get a copy of this message
Convert Times between Timezones // First set the Timezone // (see the zoneinfo directory-tree on your System for a list // it is in /usr/share/zoneinfo on my System) putenv("TZ=Europe/Rome"); // Calculate the Timstamp relative to the Timezone $timestamp=mktime($hour,$minutes,$seconds,$month,$day,$year); // Show the time echo "Date ".date("d/m/Y H:i:s",$timestamp)." in ".getenv ("TZ")."\n"; // Now Change the Timezone putenv("TZ=Australia/Adelaide"); // Show the time echo "Date ".date("d/m/Y H:i:s",$timestamp)." in ".getenv ("TZ")."\n"; http://www.php.net/manual/date.php

« previous php.notes (#12194) next »