Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Apr 2024 18:32:58 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 235136] cron email header has bogus date value
Message-ID:  <bug-235136-227-fAx1759I1a@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-235136-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-235136-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D235136

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 =3D)
> $ grep -r TargetTime .
> ./cron/cron.c:                                  tm =3D localtime(&TargetT=
ime);
> ./cron/cron.c:          TargetTime +=3D (secres1 !=3D 0) ? 1 : 60;
> ./cron/cron.c:                          e->lastexit =3D TargetTime;
> ./cron/cron.c:  struct tm *tm =3D localtime(&TargetTime);
> ./cron/cron.c:  && TargetTime > last_time /* exclude stepping back */
> ./cron/cron.c:                  difflimit =3D TargetTime + diff;
> ./cron/cron.c:                                  if ( e->lastrun >=3D Targ=
etTime )
> ./cron/cron.c:                                  if ( e->lastrun < TargetT=
ime - 3600 )
> ./cron/cron.c:                  difflimit =3D TargetTime - diff;
> ./cron/cron.c:          if (last_time =3D=3D 0 || TargetTime >=3D difflim=
it) {
> ./cron/cron.c:                  time_t difftime =3D TargetTime + tm->tm_g=
mtoff - diff;
> ./cron/cron.c:                              TargetTime >=3D e->lastexit +=
 e->interval)
> ./cron/cron.c:                                          e->lastrun =3D Ta=
rgetTime;
> ./cron/cron.c:                          e->lastrun =3D TargetTime;
> ./cron/cron.c:  last_time =3D TargetTime;
> ./cron/cron.c: * following minute and initialize TargetTime to this value=
.  TargetTime
> ./cron/cron.c:  TargetTime =3D time((time_t*)0);
> ./cron/cron.c:          TargetTime +=3D 1;
> ./cron/cron.c:          tm =3D localtime(&TargetTime);
> ./cron/cron.c:          TargetTime +=3D (60 - tm->tm_sec);
> ./cron/cron.c:          ttime.tv_sec =3D TargetTime;
> ./cron/cron.c:          Debug(DSCH, ("[%d] TargetTime=3D%ld, sec-to-wait=
=3D%d\n",
> ./cron/cron.c:                  getpid(), (long)TargetTime, seconds_to_wa=
it))
> ./cron/database.c:               * TargetTime =3D=3D 0 when we're initial=
ly populating the database,
> ./cron/database.c:               * and TargetTime > 0 any time after that=
 (i.e. we're reloading
> ./cron/database.c:              if (TargetTime !=3D 0) {
> ./cron/do_command.c:                                    arpadate(&TargetT=
ime));
> ./cron/globals.h:XTRN time_t    TargetTime INIT(0);

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-235136-227-fAx1759I1a>