Re: PHP 4.0 Bug #5037 Updated: mktime / strftime bugs

From: Date: Wed, 14 Jun 2000 21:27:37 +0000
Subject: Re: PHP 4.0 Bug #5037 Updated: mktime / strftime bugs
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-21350@lists.php.net to get a copy of this message
I am very sorry, my example was wrong. Please try this instead: <? echo "\nTest 1:" . strftime("%Y-%m-%d", 0); echo "\nTest 2:" . strftime("%Y-%m-%d", -1); echo "\n\n"; ?> This will run without problems in Linux: Test 1:1969-12-31 Test 2:1969-12-31 However it will fail in Windows 2000. Now if you comment out test 2, it will run. Sincere regards, Ying Quoting Zeev Suraski <zeev@zend.com>: > At 23:16 14/06/2000, Hartmut Holzgraefe wrote: > >Zeev Suraski wrote: > > > IMO the first one (strftime(-1)) should crash any reasonable libc > > > implementation without a problem. That's not what PHP is supposed to > be > > > calling, though (it's supposed to convert it to strftime("-1", ...). > I'll > > > try to reproduce it. > > > > >it is converted to string "-1", so it should return "-1" for each and > >any > >timestamp (and it does under linux) > > I can't reproduce the problem under Windows 2000 either. It works fine for > me. > > Zeev > -- > Zeev Suraski <zeev@zend.com> http://www.zend.com/ >

« previous php.dev (#21350) next »