[FLOW3-general] DateTime limited to Unix timestamp?

Michael Feher michael at feher.at
Fri Oct 8 21:15:21 CEST 2010


> So yes, we could create 2 different SQL backends, one with a string
> (for, e.g. the default SQLLite db which does not have a specific
> datetime datatype) and one with a datetime storage for MySQL and so on
> (I guess that would be DATETIME then?). But this alone does not help
> much. I think the more important question is: do we want to have an
> abstract way of dealing with date/time or not? And if so, how?

 From the user perspctive I would expect, that whatever object/data I 
hand over to the persistence layer, I will be able to get it back in the 
same state as I persited it. I think it is the responsibility of the 
backend to take care that the data is stored in such a way that it can 
be reconstructed. The backend should be free to use whatever format 
suits the underlaying data storage best.

I personally prefer to store DateTime objects in the native Date/Time 
format of the database and only if the database does not support 
Date/Time objects provide a workaround like storing the data in a 
string. But the key requirement has to be whatever DateTime object I 
store in the repository I will get it back unmodified, which is not the 
case with the current implementation.

Michael


More information about the FLOW3-general mailing list