From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Fri, 08 Oct 2004 20:17:37 +0200 Subject: [U-Boot-Users] RTC Question In-Reply-To: Your message of "Fri, 08 Oct 2004 09:27:21 PDT." <6.1.1.1.0.20041008090220.01e07ec0@wheresmymailserver.com> Message-ID: <20041008181742.B27ADC1430@atlas.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In message <6.1.1.1.0.20041008090220.01e07ec0@wheresmymailserver.com> you wrote: > > General question, in the specific processor (Blackfin BF533) that I am > using, the on-board RTC can have a 32768 days, and defaults to starting at > 01Jan1970. This means that RTC rollover will occur around Fri, 19-Sep-2059 > 11:59pm. On Sat 20-Sep-2059, the date will be displayed as Thur 01-Jan-1970. > > Should I add extra complexity, to extend things past this? Hou could you fix this? U-Boot will probably not even be running when the rollover happens, so it has zero chance to notice. Of course you can assume that no board will ever show a legal time before 2004, so you could always add of offset equivalent to 34 years to your RTC's date, shifting the problem until 2093 ... The offset is trivial to implement, and probably all you ever need. Best regards, Wolfgang Denk -- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de Microsoft Compatibility: your old Windows 3.11 application crash exactly as the new ones.