I have to upload an image and with that i have to send the date and time when the image is uploaded, I am getting the latitude and longitude of the device from which it is u
You can get the time zone and the current local time for a lat long from webservice by GeoNames http://www.geonames.org/export/web-services.html#timezone.
Demo link http://api.geonames.org/timezoneJSON?lat=47.01&lng=10.2&username=demo
Output Format
{"time":"2011-12-28 08:03",
"countryName":"Austria",
"sunset":"2011-12-28 16:36",
"rawOffset":1,
"dstOffset":2,
"countryCode":"AT",
"gmtOffset":1,
"lng":10.2,
"sunrise":"2011-12-28 08:04",
"timezoneId":"Europe/Vienna",
"lat":47.01
}
Register for a username here http://www.geonames.org/login