how can i get USA time using php...
Answer / 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 |
What is csrf mvc?
How to connect to mysql from a php script?
Does php have block scope?
Does not want to see PHPSESSID in the url. How can be done this ?
What are the ways to define a constant in php?
•How to access crystal reports through PHP code?
Explain the difference between mysql_connect and mysql_pconnect?
Xplain is it possible to use com component in php?
Why do we use polymorphism in php?
What is the use of mysql_real_escape_string() function?
Explain me what is the meaning of a persistent cookie?
!== represents what?