diff options
| author | Markus Niebel <[email protected]> | 2026-05-22 17:39:22 +0200 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-06-05 10:14:24 -0600 |
| commit | 3bf0e5d90c0c74e7dacc185558516cdf1e3b045c (patch) | |
| tree | 2690a82185c425e5063aaef6d473f0880a4eee60 /contrib/examples/httpd/https_example | |
| parent | 58545b01062e7acdaaad15f236301f3f36a6156b (diff) | |
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 <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Reviewed-by: Alexander Sverdlin <[email protected]>
Signed-off-by: Alexander Feilke <[email protected]>
Diffstat (limited to 'contrib/examples/httpd/https_example')
0 files changed, 0 insertions, 0 deletions
