From owner-freebsd-stable@FreeBSD.ORG Fri Feb 11 23:16:09 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1DE6A16A4CE for ; Fri, 11 Feb 2005 23:16:09 +0000 (GMT) Received: from gwmail1.grupos.com.br (gwmail1.grupos.com.br [66.90.64.125]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C78843D1D for ; Fri, 11 Feb 2005 23:16:08 +0000 (GMT) (envelope-from marcus@corp.grupos.com.br) Received: from corp.grupos.com.br (unknown [150.162.166.55]) by gwmail1.grupos.com.br (Postfix) with ESMTP id C93293EFA2 for ; Fri, 11 Feb 2005 21:16:05 -0200 (BRST) Received: from [192.168.1.3] (201-002-230-037.fnsce7006.dsl.brasiltelecom.net.br [201.2.230.37]) by corp.grupos.com.br (Postfix) with ESMTP id D3E2020A1E; Fri, 11 Feb 2005 21:16:04 -0200 (BRST) Message-ID: <420D3CB0.2030101@corp.grupos.com.br> Date: Fri, 11 Feb 2005 21:16:00 -0200 Organization: Grupos Internet S/A From: Marcus Grando User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-stable@freebsd.org, Marcus Grando Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: mktime() bug? result strtotime() fail in PHP X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Feb 2005 23:16:09 -0000 Hi, I have problems with mktime() on FreeBSD 4.11-STABLE and daylight timezone. My timezone is "America/Sao_Paulo", daylight begin on 2004-11-02 00:00 and terminate on 2005-02-20 00:00. The problem is: If run this code[1] on FreeBSD 4.11-STABLE, then return -1, if run on FreeBSD 5.3-STABLE, then return 1099364400 (correct) and if run on Linux, then return 1099364400 (correct). In PHP, strtotime() call mktime(), because that return error. Is a bug on mktime()? -- code[1] -- #include #include int main() { struct tm local; local.tm_sec = 0; local.tm_min = 0; local.tm_hour = 0; local.tm_mday = 2; local.tm_mon = 10; local.tm_year = 104; local.tm_isdst = -1; printf("%i\n", mktime(&local)); } -- code[1] -- Regards -- Marcus Grando Grupos Internet S/A marcus(at)corp.grupos.com.br