01miaom / jiankangyizhan

健康驿站
MIT License
41 stars 27 forks source link

error message #4

Open Gginmiao opened 2 years ago

Gginmiao commented 2 years ago

First of all, thank you for your code.

error message pop up

timeArray=time.localtime(int(data[149:162]))

OSError: [Errno 22] Invalid argument

if change to this, will it be ok? now=int(time.time()) timeArray=time.localtime(now)

01miaom commented 2 years ago

This is work, but there is usually a certain time difference between the local time and the server. Therefore, the time judgment method with less error was used in this project.