Fix crashes when localtime() can't handle the date.
If today in rtc, fails just log an error.