php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #49227 Paradox Timestamp format is not accurately documented
Submitted: 2009-08-12 01:47 UTC Modified: 2009-11-16 11:37 UTC
From: jordanhoneycutt at gmail dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Ubuntu 9.04
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: jordanhoneycutt at gmail dot com
New email:
PHP Version: OS:

 

 [2009-08-12 01:47 UTC] jordanhoneycutt at gmail dot com
Description:
------------
The PECL package that adds support for Paradox database tables to PHP does not correctly address the Paradox PX_FIELD_TIMESTAMP format.  The included method px_timestamp2str(), does not return an accurate representation of the timestamp.  Additionally, the description of PX_FIELD_TIMESTAMP is incorrect.  I understand the developer of this extension doesn't intend for it to ever progress past an experimental project.  Would you please update the documentation with these corrections?

Paradox timestamps are the number of milliseconds since 0001-01-01 (or practically, 0001-01-02 as they seem to start counting at the end of January 1st, 1 AD.  Note that there was no 0 AD)  The px_timestamp2str() method does not seem to function properly when converting the timestamp, providing a date that is off by one day, and a time that always defaults to an incorrect time.  Instead you can use the following calculation to convert PX_FIELD_TIMESTAMP to a unix timestamp:

$unixtime = ($record["timestamp"] / 1000) - (719163 * 86400)

Reproduce code:
---------------
px_timestamp2str($pxdoc,63385727274000,"Y-m-d H:i") 

Expected result:
----------------
should return "2009-08-11 9:27" or 1250044074 unix timestamp.


Actual result:
--------------
2009-08-12 -3:-14

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-11-16 11:37 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2009-11-16 11:37 UTC] svn@php.net
Automatic comment from SVN on behalf of vrana
Revision: http://svn.php.net/viewvc/?view=revision&revision=290806
Log: Starts at 0001-01-02 (bug #49227)
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Jun 17 01:00:01 2026 UTC