mktime() fail in auditreduce

Yuan MailList yuan.maillist at gmail.com
Thu Dec 29 03:03:48 GMT 2005


The test file is:


#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <time.h>

int main()
{

       time_t p_atime;
       char * optarg = "20051207153440";
       struct tm tm;
       strptime(optarg, "%Y%m%d%H%M%S", &tm);
       p_atime = mktime(&tm);
       printf("1133969680\n%d\n", p_atime);

}



On 12/29/05, Yuan MailList <yuan.maillist at gmail.com> wrote:
>
> The mktime() is used in auditreduce.c. But mktime() always return -1.
> After google the reason, I can not find a way to resolve this problem.
> Please tell me how to do? thanks.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freebsd.org/pipermail/trustedbsd-audit/attachments/20051229/defb09be/attachment.html


More information about the trustedbsd-audit mailing list