Total members 11889 |It is currently Fri Mar 29, 2024 12:59 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





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 .
Code:
<?php
// include class
include ("Date.php");

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

// set server time zone
$d->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");
?>




_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : change timezones in php
 Change cursor to help     -  
 change the MAC address     -  
 change the style of the kbd     -  
 How to change this title • ?     -  
 How to change the JAR Icon     -  
 Change the properties of div tag     -  
 skymiles v1.0 header change - how to?     -  
 can't able to change my windows desktop     -  
 Change table style using CSS     -  
 Change header Miles200     -  



Topic Tags

PHP Date






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com