简体   繁体   English

从Internet GMT + 6获取当前日期

[英]Get the Current Date from Internet GMT+6

I want to Get the current Date from internet. 我想从互联网获取当前日期。 When I will open my app it will compare the mobile date with Internet date. 当我打开我的应用程序时,它将比较移动日期和互联网日期。 If Both are same app will starts else show an alertDialouge. 如果两者相同,则将启动其他应用程序,否则显示alertDialouge。

Help me to solve this. 帮我解决这个问题。 Don't Refer to others questions. 不要参考别人的问题。 I have seen many questions in SoF but I didn't get any answer which is related to my question. 我在SoF中看到了很多问题,但没有得到与我的问题有关的任何答案。

Actual Answer taken from here 实际答案来自这里

You may use this api provided by http://www.geonames.org/login . 您可以使用http://www.geonames.org/login提供的此api。 it's gives you a real time. 它为您提供了实时的信息。 example of rest api like below rest api的示例如下

http://api.geonames.org/timezoneJSON?lat=51.5034070&lng=-0.1275920&username=your_user_name http://api.geonames.org/timezoneJSON?lat=51.5034070&lng=-0.1275920&username=您的用户名

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM