mirror of
https://github.com/opnsense/src.git
synced 2026-04-26 00:27:08 -04:00
Fix previous revision:
o day and mday are the same. No need to subtract 1 from mday. o Set dow to -1 as clock_ct_to_ts() checks this field and returns EINVAL on any day of the week but Sunday.
This commit is contained in:
parent
42e49837d9
commit
d9bbf2a8a9
1 changed files with 2 additions and 2 deletions
|
|
@ -138,10 +138,10 @@ inittodr(time_t base)
|
|||
ct.sec = tm.tm_sec;
|
||||
ct.min = tm.tm_min;
|
||||
ct.hour = tm.tm_hour;
|
||||
ct.day = tm.tm_mday -1;
|
||||
ct.day = tm.tm_mday;
|
||||
ct.mon = tm.tm_mon;
|
||||
ct.year = tm.tm_year;
|
||||
|
||||
ct.dow = -1;
|
||||
clock_ct_to_ts(&ct, &ts);
|
||||
ts.tv_sec += utc_offset();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue