php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2141 Behavoir of date()
Submitted: 1999-08-24 13:08 UTC Modified: 2000-01-07 01:34 UTC
From: tbehn at nextlevel dot de Assigned:
Status: Closed Package: Other
PHP Version: 4.0 Beta 2 OS: UNIX Sun Solaris
Private report: No CVE-ID: None
 [1999-08-24 13:08 UTC] tbehn at nextlevel dot de
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-12-16 23:24 UTC] evan at cvs dot php dot net
Please try this on the latest PHP4 CVS and report back.
 [2000-01-07 01:34 UTC] evan at cvs dot php dot net
Closing. No more info.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 06 15:01:31 2024 UTC