Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Apr 1999 07:47:22 -0700 (PDT)
From:      kirill@dubna.ru
To:        freebsd-gnats-submit@freebsd.org
Subject:   i386/11201: mktime possible bug
Message-ID:  <19990418144722.4403B14BFA@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         11201
>Category:       i386
>Synopsis:       mktime possible bug
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 18 07:50:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Cyrill Angelov
>Release:        2.2.8
>Organization:
Contact company
>Environment:
FreeBSD faria.jinr.ru 2.2.8-STABLE FreeBSD 2.2.8-STABLE #0: Thu Feb 25 22:34:06 MSK 1999     xxx@xxxxx:/usr/src/sys/compile/FARIA  i386

>Description:
When i set struct tm values to tm_mday = 28, tm_mon = 2, tm_hour = 2
and call mktime - it returns -1 .

If i change any of this values in any other - it works funny.

Maybe i made mistake somewhere - so plz, inform me if possible .
>How-To-Repeat:
source here .

int     main()   {
   struct       tm      *gt;
   time_t       tt;

   time(&tt);
   gt = localtime(&tt);

   printf("%d\n", mktime(gt));

   gt->tm_mday   = 28;
   gt->tm_mon    = 2;
   gt->tm_hour   = 2;

   printf("%d\n", mktime(gt));
}

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990418144722.4403B14BFA>