jayacotton / inettools-z80

Inet tools for z80-rc2014 tcp/ip stack code.
MIT License
17 stars 2 forks source link

Date and NTP seem to conspire to mess up the time. #4

Closed jayacotton closed 4 years ago

jayacotton commented 4 years ago

NTP is a quick and dirty program that attempts to convert the time stamp from NTP server to a time value for RTC.

Issues: Time zone it not really handled. Presents of RTC is not handled. Size of time zone code is a problem.

jayacotton commented 4 years ago

So, to handle time zones will require a much larger computer that a z80. We can fudge things a bit and make a kludge that will work, but will require support from a larger machine.

One of the biggest issues (besides the size of the tz database) is the fact that we don't track time in seconds since EPOCH. We can work around this with a few multiplies, bit our clock will never be a world class time piece.

Code was added to handle the presents of the RTC.

jayacotton commented 4 years ago

recent changes make this possible. C>ntp ntps1-1.uni-erlangen.de Shift Register SPI Wiznet v1.0

C>date May 1 14:54:57 PDT 2020

Note: the time zone is adjusted for PST. This needs to be fixed next.

jayacotton commented 4 years ago

ntp, today, timezone, date modified to support time zones and handle UNIXEPOCH.