From owner-freebsd-bugs@FreeBSD.ORG Sun Jun 29 11:50:14 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 45C4F37B401 for ; Sun, 29 Jun 2003 11:50:14 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DFB554401F for ; Sun, 29 Jun 2003 11:50:13 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h5TIoDUp004201 for ; Sun, 29 Jun 2003 11:50:13 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h5TIoDUM004200; Sun, 29 Jun 2003 11:50:13 -0700 (PDT) Date: Sun, 29 Jun 2003 11:50:13 -0700 (PDT) Message-Id: <200306291850.h5TIoDUM004200@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Barry Pederson Subject: Re: bin/53899: mktime gives wrong result in Central timezone X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Barry Pederson List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jun 2003 18:50:14 -0000 The following reply was made to PR bin/53899; it has been noted by GNATS. From: Barry Pederson To: freebsd-gnats-submit@FreeBSD.org Cc: Subject: Re: bin/53899: mktime gives wrong result in Central timezone Date: Sun, 29 Jun 2003 13:46:49 -0500 Here's a C equivalent to the Perl script that demonstrates the problem. Compile with: gcc -o tzdemo tzdemo.c and alter the tzdemo.sh script to run ./tzdemo instead of tzdemo.pl The output is the same as before, which should rule out this being a Perl (or Python) problem. -------- tzdemo.c ------------ #include #include #include #include int main(int argc, char **argv) { struct tm test_gm; time_t result; time_t test_time = 1055176982; memset(&test_gm, 0, sizeof(test_gm)); test_gm.tm_sec = 2; test_gm.tm_min = 43; test_gm.tm_hour = 16; test_gm.tm_mday = 9; test_gm.tm_mon = 5; test_gm.tm_year = 103; test_gm.tm_wday = 1; test_gm.tm_yday = 159; test_gm.tm_isdst = 0; result = mktime(&test_gm); printf("%s %d %d\n", getenv("TZ"), (int) result, ((int)(result-test_time))/3600); return 0; } ---------------------------