change timezones in php
Status: Interested
Joined: 28 Jun 2009
Posts: 12
Reply Quote
PHP scripting language have an built in function to change between the timezones , you will need the PEAR package . In the following example show you how to convert from GMT system format to IST Format .

// include class
include ("Date.php");

// initialize object
$d = new Date("2008-10-03 16:23:48");

// set server time zone

// print server time
echo "Local time is " . $d->format("%A, %d %B %Y %T") . "\n";

// convert to IST

// output converted date/time
echo "Destination time is " . $d->format("%A, %d %B %Y %T");

Back to top
Display posts from previous:   

All times are GMT - 8 Hours