Date and DateTime field typesby Group Public on Tuesday January 13 2009 @ 10:17:12 (1/1 Points) |
|
| User Guide ✑ Reply ✓ Stick It ✗ Ditch It ⚐ Tag It |
Where possible Date and DateTime field types will be represented using an appropriate Date type in the native language. This will not normally be an integer timestamp, as that range is limited.
PHP Date
In PHP the PEAR Date↗ class will be used. This means that all Date and DateTime fields will be of this type. Time fields still use an integer.
Setting a Date or DateTime type field must be done with a Date type. To prevent unwanted conversions no other type will be accepted or converted.
Timezone
Unfortunately the Date class, nor does any other Pear library, offer the ability to store just a date, not alongside a time. This can of course cause problems when dealing with timezones and date operations.
Persephone will just use the default timezone for Date types, but be attentive when working with them.
Persephone Date and DateTime field types
