On Wed, Jul 2, 2008 at 12:18 PM, augustin (beginner) <<a href="mailto:drupal.beginner@wechange.org">drupal.beginner@wechange.org</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hi,<br>
<br>
<a href="http://en.wikibooks.org/wiki/SQL_dialects_reference/Data_structure_definition/Data_types/Date_and_time_types" target="_blank">http://en.wikibooks.org/wiki/SQL_dialects_reference/Data_structure_definition/Data_types/Date_and_time_types</a><br>
All (but one) SQL dialects have a date type.<br>
However, Drupal's Schema API does not seem to have a type for date only:<br>
<a href="http://drupal.org/node/159605" target="_blank">http://drupal.org/node/159605</a><br>
</blockquote><div><br>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!<br>
<br>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, including Drupal.<br>
<br>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.<br><br>Damien Tournoud<br><br>[1] <a href="http://drupal.org/node/252916">http://drupal.org/node/252916</a><br>
<br></div></div>