[development] no date / time types in schema API
damz at prealable.org
Wed Jul 2 10:36:15 UTC 2008
On Wed, Jul 2, 2008 at 12:18 PM, augustin (beginner) <
drupal.beginner at wechange.org> wrote:
> All (but one) SQL dialects have a date type.
> However, Drupal's Schema API does not seem to have a type for date only:
As I said in #252916 , I think DATE / TIME and DATETIME types are really
things of the past. I understand how they could have been useful in the 80s
and 90s, especially on text-based terminals (they are fixed-length!), but
nowadays they are more a nuisance than anything. Database engines have their
own implementation specificities: for example, the Oracle implementation
expects the order of arguments to be locale dependant!
A solution based on timestamps is much more elegant: timestamps need no
(database-specific) parsing whatsoever (both on reading and writing to the
database), they play nice with arithmetic (and thus do not need any helper
functions), and are consistent with the implementation of most application,
So let's drop the support for them completely in the Schema API. Core don't
use them, please don't encourage contribution modules to.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the development