jayacotton / inettools-z80

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

today.com is a bit flaky #17

Closed jayacotton closed 3 years ago

jayacotton commented 3 years ago

It looks like today.com will not always compute the correct time of day. After about 9PM it gets the hour off by 1. This may be due to time zone computation.

jayacotton commented 3 years ago

its worse that I thought. K>date Mon Mar 29 12:54:15 2021

K>today Today is Wednesday, the thirteenth day of October, two thousand and sixty-six. In thirty-seven seconds, the time will be twenty-one minutes before six PM, Daylight Savings Time. The moon is in its last quarter.

jayacotton commented 3 years ago

well, it seems to be working now. I will check it a few more times and then close this bug. C>today Today is Monday, the twenty-ninth day of March, two thousand and twenty-one. The time is twenty-six minutes and thirty seconds after nine PM, Daylight Savings Time. The moon is full.

C>date Mon Mar 29 21:26:44 2021

And for the curious. Date uses the RTC chip to get the date, as set by ntp. Ntp also sets the Epoch. From there Today calculates the time by working with Epoch and time from last ntp.

jayacotton commented 3 years ago

This seems to have gone away on its own. I suspect a mismatch in struct fram (i.e. old code)