[Typo3-dev] Dates in non-UNIX format

Martin Seebach typo3lists at g-bach.dk
Thu Nov 25 01:02:06 CET 2004


stefano cecere wrote:

> obvious, all 64bit-timestamps are in GMT=0 .. so we can assure 
> "absolute" positioning in the time dimension..
> so every installation should take care of the (quite easy to develop) 
> relative time-zone compensation.

Actually, no, not neccessarily. I usually store my timestamps in localtime.
And there is no need to develop anything - the issue is the same with 32 
bit timestamps, and we handle those fine today.

> i think the ISO standards are there to stay and to be used for 
> exchange of data.. but if typo3 could go 1000% faster using 64 bit 
> timestamp instead of 16chars strings..

ISO standards are here for the exchange of data - not for the storage of 
data! Using an integerfield, rather than a stringfield, is only mildly 
faster, and shouldn't really be the only reason for not using it.

> i think it would not be that difficult to write a 64 timestap <-> ISO 
> datetime little library... (i guess it already exists)

All exising date/time libraries, working with 32-bit dates would work, 
if ported to use bignum artihmetic libraries. Perhaps except for 
negative years, and the whole no-year-zero deal.

> last think: also because i'd like to have datas <9999ac and  >9999 
> (yes i'm an ancient history fond and sci-fiction novelist ;)

My initial opposition to the whole 'years before christ' is a lack of 
application. There is simply no generic need to represent exact dates so 
far from now. When we discuss the extinction of the dinosaurs, we say 
"42 million years ago". Not "-41846383T142304Z". For that matter, the 
chunck of land that Greenwich is on, wasn't even in the right spot back 
then. If you really need to make a database of prehistoric events, that 
needs continous sorting on the database level, put in a "year" field, 
and sort by that. The same goes if you need higher precision than seconds.
That said - if we are upgrading the size of the date/time datatype, we 
might as well do it right, and cover any concieveable date.

Venlig hilsen
Martin Seebach






More information about the TYPO3-dev mailing list