readers.conf localtime bug?

J.J.Bailey jjb at
Thu Nov 23 02:23:54 UTC 2000

> In article <3A1C0BDF.50EF18C4 at>,
> 	"J.J.Bailey" <jjb at> wrote;

> } Articles have dates in UTC.  I saw two articles in the workers' archive
> } but was unable to determine if it's supported or working.

> localtime is used when posted article does not include
> Date header.  It's filled with localtime in the case.
> -- 
> Katsuhiro Kondou

It's not working, so I added some debugging to post.c.  Either it
thinks the article has a date header, or I didn't set the flag.

FILE *DebugFP = fopen("/tmp/nnrpdebug", "w");
setbuf(DebugFP, NULL);

    /* 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";



Here is the entire article input to nnrpd:

From: root at
Newsgroups: znet.test
Distribution: zNET
Subject: test

Wed Nov 22 18:14:05 PST 2000


Here is /tmp/nnrpdebug:

datebuff=Thu, 23 Nov 2000 02:14:07 +0000 (UTC)
HDR(_date) = 1


Here is the entire readers.conf file:

auth staff {
	auth:		"ckpasswd -s"
	default:	"<staff>"

access staff {
	users:		"<staff>"
	newsgroups:	"*, !control, !junk"
	access:		"Read"
	localtime:	true

auth localhost {
	hosts:		"localhost,, stdin,,"
	default:	"<news>"

access localhost {
	users:		"<news>"
	newsgroups:	"*"
	access:		"Read Post"
	localtime:	true

More information about the inn-bugs mailing list