Total members 11841 |It is currently Sat Jan 16, 2021 2:10 pm 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
 How to change this title • ?     -  
 How to change the JAR Icon     -  
 Change the properties of div tag     -  
 Change cursor to help     -  
 change the MAC address     -  
 change the style of the kbd     -  
 Skymiles Colour Change?     -  
 change button location in in C#     -  
 Change the shading of object     -  
 Change cursor to move     -  



Topic Tags

PHP Date
cron





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