redho home | products | services

Programming Forums


Community for Java, PHP, Perl C, ASP and Python programmers
Tuesday 18 September 2018 21:02

Ask your IT question here

change timezones in php



 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Programming Forums -> PHP programming forum
View previous topic :: View next topic  
Author Message
gilbertsavier
New Programmer


Joined: 02 Jul 2009
Posts: 21
Hi,all,
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 .

<php>setTZByID("GMT");

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

// convert to IST
$d->convertTZByID("PST");

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

?>
_________________
Thanks & regards
Lokananth

Live Chat Software By miOOt

Reply with quote
 
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Programming Forums -> PHP programming forum


Dubai Forums - Expat Help | Vegan Forum | Java Programming | 3d Design Resources | 3d Forum | 3D Jobs | 3D Textures | Paris Forum | Europe Forum
Dubai Classifieds | Dubai Property | Jobs in Dubai | Free London Classifieds | Jobs in London UK

High Quality, Custom 3d animation and Web Design solutions Royal Quality Web Hosting Services Vegetarian and Animal Rights news

© 2018 RedHo