beagleboard BASIC TIME$
Terry Swanborough (455) 53 posts |
Hi I tried to set the time on the beagleboard using TIME$ from BASIC if I use :- TIME$=”Thu,02 Dec 2010” when I print TIME$ I get Fri,03 Dec 2010” I tried the same code on the Iyonix and it works OK IF I add in the time setting to the string then it works OK on both the Iyonix and the Beagleboard? eg. TIME$=”Thu,02 Dec 2010.00:00:00 |
Martin Bazley (331) 379 posts |
This sounds like a side-effect of a bodge introduced at some uncertain point (uncertain because the forum search is useless) to make the default date 2nd Jan 1970, rather than 1st Jan 1970. The latter caused some problem or other which I can’t recall, but it looks as though the ‘fix’ has been implemented in such a way as to trap any attempt to set the clock, not just when the BB starts up and doesn’t know what time it is. |
Terry Swanborough (455) 53 posts |
Hi I am not worried, I can just add in the time text to correct the problem, just thought I would highlight what I have found. BTW your right about the search function I have had very little success using it. |
Dave Higton (281) 668 posts |
You do know that your search term has to be in all lower case, don’t you? There is a reported bug. |
Martin Bazley (331) 379 posts |
Yes. Try it for yourself. Unless ‘all lower case’ doesn’t stretch to numeric characters? (If so, I rest my case – the forum search is useless.) |
Jeffrey Lee (213) 6048 posts |
I’ve just checked in a fix for that bug. The RTC code in the HAL wasn’t dealing with the case where only the date (or only the time) was meant to be updated, so it was writing invalid values to the RTC (which RISC OS was then reading back immediately after setting the time)
Nope :) I’m not quite sure when the default was changed from 1st Jan 1970 to 2nd Jan 1970 (if it was ever changed at all), but it looks like this change to the kernel (from 2001) is responsible for making sure the default date is set to 2nd Jan 1970 instead of 1st Jan 1900 (or whatever other value it would default to if there was no RTC). I think you may be getting confused with this bug to do with entering alarms in 1900 |