[TYPO3-50-general] Dates outside Unix Timestamp

Alban Cousinié ace at mind2machine.com
Tue Nov 13 16:31:42 CET 2007


>the most obvious thing for me would be, to use date features of 
>databases, or at least store the dates in that format 'yyyy-mm-dd'. 
>Searching for specific dates or maybe birthdays is no big deal with this 
>format.

MySQL 5.0 documentation states :
MySQL retrieves and displays DATETIME values in 'YYYY-MM-DD HH:MM:SS'
format. The supported range is '1000-01-01 00:00:00' to '9999-12-31
23:59:59'.

Thus using the databases internal format is not 100% satisfying, even though
it would be a huge progress compared to the time range currently offered by
timestamps.

In the case of our library extension, we have to deal with authors such as
Epicurius 
birthdate= -341 
death date= -270 

For such an author, even the MySQL5 range is not satisfying.

On the other hand, using databases dates has the big advantage of being able
to use SQL date functions for date calculations or sorting by date. Using a
custom format would cut these benefits and require the implementation of
custom php date functions which would certainly be less efficient, and which
should not help much for date sorting.

Alban Cousinié
http://www.mind2machine.com






More information about the TYPO3-project-5_0-general mailing list