Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how can i get USA time using php...

Answer Posted / arunkumar.s

Hello friends,
Following time zones are used EST,CST,MST,PST,AKST,HST. If
you want to get EST time then,

<?php
putenv('TZ=EST');
echo date("H:i:s :a");
?>


All other time zone's
<?php
putenv('TZ=EST');
echo date("H:i:s :a");
echo "<br/><br/>";
putenv('TZ=CST');
echo date("H:i:s :a");
echo "<br/><br/>";
putenv('TZ=MST');
echo date("H:i:s :a");
echo "<br/><br/>";
putenv('TZ=PST');
echo date("H:i:s :a");
echo "<br/><br/>";
putenv('TZ=AKST');
echo date("H:i:s :a");
echo "<br/><br/>";
putenv('TZ=HST');
echo date("H:i:s :a");
?>

Pls check and try
All the best

Is This Answer Correct ?    7 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create and destroy cookies in php?

849


Write a program in php to find the occurrence of a word in a string?

1037


What is PECL?

1144


What is binary safe string?

923


How the web server interprets php and interacts with the client?

920


Tell me how can we pass the variable through the navigation between the pages?

933


What is crypt () in php?

871


What is the difference between core php and php?

888


Explain about getters and setters in php?

999


How do I run a php script in windows?

989


What is php written in?

940


How are variables declared in php?

967


How can you make a connection with mysql server using php?

923


Suppose the variable $var1 is set to 10 and the $var2 is set to the character var1, what's the value of $$var2?

909


Is session a cookie?

924