• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get Correct time all over the world based on timezone.

#1
[eluser]Dhanapal MCA[/eluser]
Solution

$now = time(); // local time one hour fast
$gmt = local_to_gmt($now); // converted to gmt time
echo $timestamp = $gmt;

$timezone = 'UP55'; // This is indian standard timezone
$daylight_saving = FALSE;
echo $correct_time = gmt_to_local($timestamp, $timezone, $daylight_saving);
echo "<br/> Unix to Human: " . unix_to_human($correct_time);


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.