[dev] RDO setTimestamps

Ben Chavet ben at horde.org
Wed May 3 06:34:45 PDT 2006


Quoting Karsten Fourmont <fourmont at gmx.de>:

> Duck wrote:
>> I see that RDO automatically handles creation and update time of a row.
>> But why use unix timestams rather than the SQL NOW() function, So   
>> we can deal with dates not with intigers? As SQL has date dedicated  
>>  function, it will be much easier to deal with them.
>
> I personally prefer using integers: I had lots of bad experiences with
> SQL DATE types: some databases tend to return dates in format like
> "02.11.2007" or "11/02/2007" depending on the locale setting in the
> database. So you end up doing a lot do decoding and encoding. It's OK
> if your database wrapper does that reliably but a small nightmare if
> not.

I'd much rather see integers.  I've been wrestling with kronolith and  
mssql for weeks now, just because of the stupid date fields.  I'm sure  
most/all SQL engines have optimized date functions, but if we're going  
to continue to support the range of databases that we currently do, I  
think we should opt for the most portable option.

--Ben

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: PGP Digital Signature
Url : http://lists.horde.org/archives/dev/attachments/20060503/3ba5f5c1/attachment.bin


More information about the dev mailing list