[Tutor] Fwd: Re: checking connection to internet until success

2018-01-02 Thread Alan Gauld via Tutor
Forwarding to list... Forwarded Message Subject:Re: [Tutor] checking connection to internet until success Date: Wed, 3 Jan 2018 01:35:18 +0100 From: Pi To: Alan Gauld 10 months ago i wrote application using time from OS (Windows 7), but my alpha tester fou

Re: [Tutor] checking connection to internet until success

2018-01-02 Thread Alan Gauld via Tutor
On 01/01/18 21:38, Pi wrote: > with this code i am getting actual date from internet. I need correct > date, because i am not sure this set on computer is right. The first obvious pointto make is that all modern OS come with an option to read the date/time from an internet time server so this is

Re: [Tutor] checking connection to internet until success

2018-01-02 Thread Peter Otten
Pi wrote: > Hi Tutor, > > with this code i am getting actual date from internet. I need correct > date, because i am not sure this set on computer is right. > > import requests, time > > try: > OnLineDate = requests.get("http://just-the-time.appspot.com";).text[:10] > OffLineDate = tim

[Tutor] checking connection to internet until success

2018-01-02 Thread Pi
Hi Tutor, with this code i am getting actual date from internet. I need correct date, because i am not sure this set on computer is right. import requests, time try:     OnLineDate = requests.get("http://just-the-time.appspot.com";).text[:10]     OffLineDate = time.strftime("%Y-%m-%d")