Files
u-boot/cmd
Markus Niebel 3bf0e5d90c cmd: date: validate date using rtc_month_days()
The old check accepted day 0 as well as Feb 29th in non-leap years.
With this change, both day and month 0 are rejected, and the local day
limit logic is now handled by rtc_month_days(), which correctly accounts
for month length and leap years.

In the 'MMDDhhmm' format case, tm_year is not initialized by mk_date().
The leap-year calculation in rtc_month_days() therefore depends on the
value provided by the caller, which do_date() does, via dm_rtc_get().
This is pre-existing behaviour, but is now made more explicit.

Signed-off-by: Markus Niebel <Markus.Niebel@ew.tq-group.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Signed-off-by: Alexander Feilke <alexander.feilke@ew.tq-group.com>
2026-06-05 10:14:24 -06:00
..
2026-04-22 14:23:49 -06:00
2026-04-27 11:26:40 -06:00
2026-03-18 13:07:36 -06:00
2026-05-22 16:47:54 -06:00
2026-04-27 11:26:40 -06:00
2026-05-12 15:52:01 +02:00
2026-04-08 11:07:00 -06:00