I have a requirement where by i have to find out the local date and time of the place i have searched.
E.g i have searched Hawii, USA. I need to know how to find date and time of this place.
I have tried using timezones function in php but it is working only for a few places. Also tried
<?
$city["Name"] = "Hawii, United States ";
$city["GMT"] = 10;
$city_time = time()+($city["GMT"]*3600); //sum the timestamps
echo gmdate("m-d-Y h:i a",$city_time); //echo the formatted date
echo " in the beautiful city of ".$city["Name"];
?>
This gives me incorrect value.
FYI i have GMT values and Latitude-Longitude values for each city/state.
Can anyone help me how to solve my problem asap.
Thanks in advance.