Is there a Google API to get current time from a timezone? If there is, how do I use it? I want to get current online time from a specific timezone, like getting "current time: 03/08/2015 11:27:54" or something like that. I want to get it from Google because of it confidence.
Thanks!
This answer does well to give a method on how to do this. https://stackoverflow.com/a/13066298/2864560
Yahoo is just as reliable as Google in terms of small things like getting Time data, so this should not be so much of a hassle. You could get the time from Android (kinda like Google) by using this link: https://stackoverflow.com/a/8214204/2864560.
Another that would be reliable per user is this little piece of code
LocationManager locMan = (LocationManager) activity.getSystemService(activity.LOCATION_SERVICE);
long networkTS = locMan.getLastKnownLocation(LocationManager.NETWORK_PROVIDER).getTime();
That essentially gives you the time down to the second since it is using data that could be even more accurate than Google's
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With