[TYPO3-core] XAVIER PLEASE! was: Re: RFC: #12652: Value Preview of empty timestamp shows "01-01-70 (-40 yrs) "

Xavier Perseguers typo3 at perseguers.ch
Wed Dec 9 08:00:54 CET 2009


Hi,

Mathias Schreiber [wmdb >] wrote:
> Dmitry Dulepov schrieb:
>> If we want to do it properly, we should change all date/time fields 
>> from int to datetime and use those. Then we can assign proper defaults 
>> (such as '0000-00-00' and '2099-12-31' and do very simple checks in SQL.
> 
> Good idea.
> Are there any implications with DBAL or do adoDB's datetime functions 
> cover this change?

I did not yet test yet how well date/time fields are handled. However, I guess we should not only change fields but also provide dedicated methods in the API to perform operations on date/time fields 
as comparison operators (less than, less than equal, greater than, ...) are trickier to deal with when the underlying column is a date than a simple integer timestamp. There is a "timestamp" datatype 
in many DBMS, which might be better for us than a simple date/time datatype [1]. We should have a look at implications before proposing such a major change.

But I agree that some kind of date/time datatype would self be "better".

[1] http://it.toolbox.com/blogs/database-solutions/a-comparison-of-oracles-date-and-timestamp-datatypes-6681

-- 
Xavier Perseguers
http://xavier.perseguers.ch/en

One contribution a day keeps the fork away


More information about the TYPO3-team-core mailing list