[Bug 235136] cron email header has bogus date value
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 10 Apr 2024 18:32:58 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235136 Michael Osipov <michaelo@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |michaelo@FreeBSD.org --- Comment #1 from Michael Osipov <michaelo@FreeBSD.org> --- Does this still happen, looking at the code I guess it is updated: > osipovmi@deblndw011x:~/var/Projekte/freebsd/src/usr.sbin/cron (main =) > $ grep -r TargetTime . > ./cron/cron.c: tm = localtime(&TargetTime); > ./cron/cron.c: TargetTime += (secres1 != 0) ? 1 : 60; > ./cron/cron.c: e->lastexit = TargetTime; > ./cron/cron.c: struct tm *tm = localtime(&TargetTime); > ./cron/cron.c: && TargetTime > last_time /* exclude stepping back */ > ./cron/cron.c: difflimit = TargetTime + diff; > ./cron/cron.c: if ( e->lastrun >= TargetTime ) > ./cron/cron.c: if ( e->lastrun < TargetTime - 3600 ) > ./cron/cron.c: difflimit = TargetTime - diff; > ./cron/cron.c: if (last_time == 0 || TargetTime >= difflimit) { > ./cron/cron.c: time_t difftime = TargetTime + tm->tm_gmtoff - diff; > ./cron/cron.c: TargetTime >= e->lastexit + e->interval) > ./cron/cron.c: e->lastrun = TargetTime; > ./cron/cron.c: e->lastrun = TargetTime; > ./cron/cron.c: last_time = TargetTime; > ./cron/cron.c: * following minute and initialize TargetTime to this value. TargetTime > ./cron/cron.c: TargetTime = time((time_t*)0); > ./cron/cron.c: TargetTime += 1; > ./cron/cron.c: tm = localtime(&TargetTime); > ./cron/cron.c: TargetTime += (60 - tm->tm_sec); > ./cron/cron.c: ttime.tv_sec = TargetTime; > ./cron/cron.c: Debug(DSCH, ("[%d] TargetTime=%ld, sec-to-wait=%d\n", > ./cron/cron.c: getpid(), (long)TargetTime, seconds_to_wait)) > ./cron/database.c: * TargetTime == 0 when we're initially populating the database, > ./cron/database.c: * and TargetTime > 0 any time after that (i.e. we're reloading > ./cron/database.c: if (TargetTime != 0) { > ./cron/do_command.c: arpadate(&TargetTime)); > ./cron/globals.h:XTRN time_t TargetTime INIT(0); -- You are receiving this mail because: You are the assignee for the bug.