micropython
micropython copied to clipboard
time.time() and gps.time() explanation
Hi all here, im relatively new in micropython coding and im not sure how to manage to have a current time set in the board when it boots.
time.time() give datatimes values near 2050..
time.localtime(time.time()) (2047, 1, 1, 10, 14, 39, 1, 1) time.time() 1483265755
and gps.time() worst.
gps.get_firmware_version() ',GOKE9501_1.4_18022400,GOKE microsemi' gps.time() 2525040637 thats as the seconds are even bigger localtime would return overruns.
any hint?
wait for right gps.time() or use ntptime? ntptime.settime() ?
I’ve noticed that gps gives time near 2050 when it doesn’t see satellites
As far as I remember, gps starts with reporting year 1980. Micropython cannot handle anything before 2000 so it should report 2080 or something. time.time outputs network time. If there is a bug there I will need more information.