From owner-freebsd-stable@FreeBSD.ORG Thu Feb 17 11:53:26 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 C9C9716A4CE for ; Thu, 17 Feb 2005 11:53:26 +0000 (GMT) Received: from gwmail1.grupos.com.br (gwmail1.grupos.com.br [66.90.64.125]) by mx1.FreeBSD.org (Postfix) with ESMTP id 97FB143D2F for ; Thu, 17 Feb 2005 11:53:26 +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 4374C3C6F1; Thu, 17 Feb 2005 09:53:26 -0200 (BRST) Received: from [150.162.166.51] (noc.grupos.com.br [150.162.166.51]) by corp.grupos.com.br (Postfix) with ESMTP id 4863120A22; Thu, 17 Feb 2005 09:53:25 -0200 (BRST) Message-ID: <421485B4.1070102@corp.grupos.com.br> Date: Thu, 17 Feb 2005 09:53:24 -0200 Organization: Grupos Internet S/A From: Marcus Grando User-Agent: Mozilla Thunderbird 0.6+ (X11/20050212) MIME-Version: 1.0 To: Peter Jeremy References: <420D3CB0.2030101@corp.grupos.com.br> <20050212205104.GF62061@cirb503493.alcatel.com.au> <4210941E.7070202@corp.grupos.com.br> <20050214184909.GH57256@cirb503493.alcatel.com.au> In-Reply-To: <20050214184909.GH57256@cirb503493.alcatel.com.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-stable@freebsd.org Subject: Re: 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: Thu, 17 Feb 2005 11:53:26 -0000 Hi, Peter Jeremy wrote: >>Also FreeBSD 5.3-STABLE? > > I don't have a 5.3-STABLE system to confirm but if it doesn't return -1 > it is wrong. > Then, it's wrong. > What timestamp should it return? 2004-11-02 00:00:00 doesn't exist for > you, therefore there is no possible value for seconds since epoch that > will convert to this time. The manpage states: > until tm_mon and tm_year are determined. The mktime() function returns > the specified calendar time; if the calendar time cannot be represented, > it returns -1; > Since 2004-11-02 00:00:00 cannot be represented, then it should return -1. > > Maybe you should explain why having mktime() correctly report an error is > a problem for you. > Because of that: -- Marcus Grando Grupos Internet S/A marcus(at)corp.grupos.com.br