How to get world time from GPS on Android
I'm trying get real world time from my GPS on Android:
Date date = new Date(location.getTime());
Doc says: "Location.getTime() returns the UTC time of this fix, in milliseconds since January 1, 1970.". I know it's a location date taken from the device's system time. The user can change the system time on device to get a profit. How can I get time without using internet and using GPS only?
--
Пытаюсь получить мировое время по GPS точке в Android. Код:
Date date = new Date(location.getTime());
В документации сказано, что метод Location::getTime() возвращает время создания объекта. Это время взято от системного времени устройства. Пользователь может изменить системное время чтобы получить какой-то бонус для себя. Как я могу узнать текущее мировое время используя только данные от GPS без использования интернет?