From owner-freebsd-bugs Sun Apr 18 7:52:27 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id C758D151AE for ; Sun, 18 Apr 1999 07:52:25 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.2/8.9.2) id HAA23422; Sun, 18 Apr 1999 07:50:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: by hub.freebsd.org (Postfix, from userid 32767) id 4403B14BFA; Sun, 18 Apr 1999 07:47:22 -0700 (PDT) Message-Id: <19990418144722.4403B14BFA@hub.freebsd.org> Date: Sun, 18 Apr 1999 07:47:22 -0700 (PDT) From: kirill@dubna.ru To: freebsd-gnats-submit@freebsd.org X-Send-Pr-Version: www-1.0 Subject: i386/11201: mktime possible bug Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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