Jump to content

FInd Date and Time for any state/city searched.


Recommended Posts

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.