php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #50543 hardcoded CS_DT_CONVFMT results in loss of datetime precision
Submitted: 2009-12-21 17:04 UTC Modified: 2015-02-18 07:44 UTC
Votes:7
Avg. Score:3.7 ± 1.7
Reproduced:4 of 6 (66.7%)
Same Version:4 (100.0%)
Same OS:4 (100.0%)
From: kelaskin at gmail dot com Assigned:
Status: Wont fix Package: Sybase-ct (ctlib) related
PHP Version: 5.3.1 OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
1 + 35 = ?
Subscribe to this entry?

 
 [2009-12-21 17:04 UTC] kelaskin at gmail dot com
Description:
------------
It is impossible to retrieve DATETIME values with precision higher than 1 minute (as CS_DATES_SHORT format drops seconds).

The value of CS_DT_CONVFMT should be configurable in the script context.

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ocs_12.5.1.comlib/html/comlib/X37122.htm

Reproduce code:
---------------
php_sybase_ct.c:

// Set datetime conversion format to "Nov  3 1998  8:06PM"
CS_INT dt_convfmt = CS_DATES_SHORT;

Expected result:
----------------
"Aug 24 1998 05:36:34:000PM"

Actual result:
--------------
"Nov  3 1998  5:36PM"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-20 08:57 UTC] jani@php.net
-Package: Feature/Change Request +Package: Sybase-ct (ctlib) related
 [2010-12-20 08:57 UTC] jani@php.net
-Operating System: any +Operating System: *
 [2015-02-18 07:44 UTC] krakjoe@php.net
-Status: Open +Status: Wont fix
 [2015-02-18 07:44 UTC] krakjoe@php.net
The sybase maintainer has backed away from the project, since nobody new has come forward it has been removed in version 7 of PHP.

For this reason, I'm marking the bug as won't fix, it can still be found by any maintainer that might come along and revive sybase as a PECL project.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 06:01:29 2024 UTC