[development] no date / time types in schema API
Gerhard Killesreiter
gerhard at killesreiter.de
Wed Jul 2 11:15:40 UTC 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Damien schrieb:
> On Wed, Jul 2, 2008 at 12:18 PM, augustin (beginner) <
> drupal.beginner at wechange.org> wrote:
>
>> Hi,
>>
>>
>> http://en.wikibooks.org/wiki/SQL_dialects_reference/Data_structure_definition/Data_types/Date_and_time_types
>> All (but one) SQL dialects have a date type.
>> However, Drupal's Schema API does not seem to have a type for date only:
>> http://drupal.org/node/159605
>>
>
> As I said in #252916 [1], 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
You obviously have never dealt with timestamps for dates...
They are a most royal PITA, especially when dealing with timezones and
DST.
Cheers,
Gerhard
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFIa2Ncfg6TFvELooQRAvauAJ9Wgb09MJsXkeatskNmhVw3996yNgCgp1Ws
635A/W2d3MssqbWMyfxRiEA=
=jxJz
-----END PGP SIGNATURE-----
More information about the development
mailing list