readers.conf localtime bug?

J.J.Bailey jjb at bcc.com
Mon Nov 27 02:55:32 UTC 2000




> In article <3A217DA4.954A9428 at bcc.com>,
> 	"J.J.Bailey" <jjb at bcc.com> wrote;

> } TZ=US/Pacific

> It should use PST for the case.  Again, can you put some
> debugging lines into post.c to show which case is used
> for Date header processing?

To obtain nnrpd's environment, I added a call to "env":

{
FILE *DebugFP = fopen("/tmp/nnrpdebug", "w");
setbuf(DebugFP, NULL);
system("/usr/local/bin/env > /tmp/nnrpdenv");

    /* Set Date.  datebuff is used later for NNTP-Posting-Date, so we have
	to set it and it has to be the UTC date. */
    if (!makedate(0, FALSE, datebuff, sizeof(datebuff)))
	return "Can't generate date header";

if(*datebuff) fprintf(DebugFP, "datebuff=%s\n", datebuff);
fprintf(DebugFP, "HDR(_date) = %d\n", HDR(_date) ? 1 : 0);
fprintf(DebugFP, "localtime=%d\n", localtime);

    if (HDR(_date) == NULL) {
	if (PERMaccessconf->localtime) {
            if (!makedate(0, TRUE, localdatebuff, sizeof(localdatebuff)))
		return "Can't generate local date header";
            HDR(_date) = localdatebuff;

if(*localdatebuff) fprintf(DebugFP, "localdatebuff=%s\n", localdatebuff);

	} else {
            HDR(_date) = datebuff;
	}
    } else {
	if ((t = parsedate(HDR(_date), &Now)) == -1)
            return "Can't parse \"Date\" header";
	if (t > Now.time + DATE_FUZZ)
            return "Article posted in the future";
    }

fclose(DebugFP);
}


**********


Here are the contents of the debug file:


datebuff=Mon, 27 Nov 2000 02:06:33 +0000 (UTC)
HDR(_date) = 1
localtime=373464




More information about the inn-bugs mailing list