PHP 4.0 Bug #2141: Behavoir of date()

From: Date: Tue, 24 Aug 1999 17:08:13 +0000
Subject: PHP 4.0 Bug #2141: Behavoir of date()
Groups: php.dev 
Request: Send a blank email to php-dev+get-10159@lists.php.net to get a copy of this message
From: tbehn@nextlevel.de Operating system: UNIX Sun Solaris PHP version: 4.0 Beta 2 PHP Bug Type: Scripting Engine problem Bug description: Behavoir of date() I discoverd the following: 1. A query is performed using a Sybase function 2. fetch_array() is beeing used 2. data set contains a field wih a unix timestamp, that needs to be converted by date() 3. if I use the field index (e.g. $row[1]) everything is fine 4. ifI use the field name (e.g. $row["date"]) and use the date() on this variable, the function isn't executed all the time. On some data-sets it still shows the original timestamp instead of the formated data. Here is an example code: $row = sybase_fetch_array($result); $row [1] = date("d.m.y H:i",$row [1]);<- works fine $row["datum"] = date("d.m. H:i",$row["datum"]);<- works sometimes Hope this helps. Regards Torsten

« previous php.dev (#10159) next »