propelorm/Propel2 — Issue #59: Store date/time values internally as DateTimes
Author: nnarhinen
Created: 2011-11-18 19:40:36+00:00
State: open

Propel 1.x branch stores date and time values as strings internally in the generated objects.

The historical reason for that was the lack of DateTime serialization in PHP < 5.3. Now when we are 5.3+ only, we could store the datetimes internaly as DateTimes.

Why is this so important?

* Make setters / getters more simple, no need to handle the string representation serialization
* Intuition. #48 makes the getters always return DateTime instances. Then you will end up doing stuff like

$foo->getDate()->modify('+1 days'); $foo->save();

and you would expect it to end up to the database modified. Currently it doesn't modify anything.