Re: Weird mktime problem

From: Date: Thu, 26 Jun 2003 11:52:49 +0000
Subject: Re: Weird mktime problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-152962@lists.php.net to get a copy of this message
On Thursday 26 June 2003 18:46, Naintara Jain wrote: > You might want to consider removing the leading zeroes, this post is there > in the php manual and has been useful to me. > > ---------xxx----------------------------- > jchen3625 AT yahoo DOT com (25-Aug-2002 03:33) > > beware, arguments with leading zeros are treated as zeros. > that is, > "mktime(0,0,0,10,09,2002)" == 09/30/2002, whereas > "mktime(0,0,0,10,9,2002)" == 10/09/2002. > ---------xxx----------------------------- To be precise, integers written with a leading zero are treated as octal numbers. But octal numbers can only contain digits 0-7. If it contains any other digits then (probably) the whole value is rendered as 0. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* So this it it. We're going to die. */

« previous php.general (#152962) next »