[U-Boot] [PATCH 10/33] rtc: mc146818: Set up RTC at start of day

Wolfgang Denk wd at denx.de
Wed Nov 12 09:12:18 CET 2014


Dear Simon,

In message <1415751501-23407-11-git-send-email-sjg at chromium.org> you wrote:
> If the RTC needs to be cleared, write the U-Boot build date to it. In any
> case make sure the settings are correct.

Is this really a good idea?  Why writing the build date?  It is as
wrong as any other arbitrarily chose point of time, and when each
device comes up with a different (incorrect) time this could be pretty
much confusing.

If you need a sane time for initialization, would it not make more
sense to chose a fixed date?  If you don't want to use the epoch (say,
to avoid y2038 issues), you could use 2010-01-01 00:00 or similar
instead.

If I see the clock comes up at such a date I will notice that this is
an uninitialized time. It it comes up with something as "Tue, 11 Nov
2014 17:17:58"  I will assume this is a real time, and wonder what's
gone wrong that i's in the past.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Anything that is worth doing at all is worth doing well.
                                       -- Philip Earl of Chesterfield


More information about the U-Boot mailing list