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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tbehn at nextlevel dot de
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sun May 11 13:01:28 2025 UTC