php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10350 OCIResult doesn't return time for an Oracle Date field
Submitted: 2001-04-16 16:07 UTC Modified: 2006-04-04 06:25 UTC
From: dwilson at cae dot wisc dot edu Assigned: maxim (profile)
Status: Not a bug Package: OCI8 related
PHP Version: 4.0.3pl1 OS: *
Private report: No CVE-ID: None
 [2001-04-16 16:07 UTC] dwilson at cae dot wisc dot edu
The Oracle Date fields are actually DateTime fields.  Your OCIResult routinue returns the date only.
As this point, you can't change what OCIResult does because you'd break existing code.
I request that you add a new function allowing the recovery of the time value of an Orcale Date field.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-16 17:48 UTC] cnewbill@php.net
Joe Brown says:

This is not a PHP bug.

Consider setting NLS_DATE_FORMAT.

The manual states OCIResult() returns everything as a string.
NLS_DATE_FORMAT may not be appropriate for your needs.

There are quite a few places you can set NLS_DATE_FORMAT.
* Environment variables (or windows registry on win32)
* orclSID.ora
* on a per session basis; execute this statement after logon:

$cursor=OCIParse($connection, "ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD
HH24:MI:SS'");
OCIExecute($cursor);
OCIFreeCursor($cursor);

 [2003-01-29 09:03 UTC] maxim@php.net
Besides being a little bit bogus, this also has chances to be already solved meanwhile.
 [2006-04-04 06:25 UTC] tony2001@php.net
.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 09:01:29 2024 UTC