Re: Re: [PEPr] Proposal for Database::DB_Table

From: Date: Wed, 07 Jan 2004 18:00:13 +0000
Subject: Re: Re: [PEPr] Proposal for Database::DB_Table
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-24869@lists.php.net to get a copy of this message
Hi! Paul M Jones wrote:
Perhaps this will help: http://www.analysisandsolutions.com/code/dates.htm It's an overview of several DBMS's and how to get them to handle the standard ISO date and timestamp formats for input and output.
I don't understand... DB_Table defines a timestamp as a 4-byte integer, thus a Unix timestamp. This is portable across all RDBMSs. When using DB_Table, you know (regardless of the RDBMS) exactly how your timestamp is going to be stored and retrieved. Perhaps you were offering advice on DB_DataObject in the DB_Table thread?
Of course this *brilliant* solution has several major flaws: 1) DB-specific timestamp may have a (far) wider range than 4-byte integer, and a better precision. Try storing a list of birth dates as integers, to get my point well, or some scientific data with milli- and micro-seconds... 2) DB-specific timestamp may have timezone information. 3) RDBMS may have sophisticated date and time-related functions that for some strange reason will *not* work on integers.

« previous php.pear.dev (#24869) next »