Re: DATETIME or UNIX TIMESTAMPS?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 26 October 2006 15:36, Marcelo de Moraes Serpa wrote:
> Hello list,
>
> I've always used Unix Timestamps until now, but lately I've reading about
> MySQL's datetime datatype and its benefits (dates before 1970, after 2030,
> SQL functions to deal with them, etc). However, I don't see much support
> for them in the PHP API. I'm also a Flash programmer and the Flash 8 API
> Date datatype also only understands unix timestamps. Taking this into
> account, I'm not really sure if it really worths it to "move" to the
> DATETIME datatype. What would you do? Any advice would be much appreciated!
>
> Marcelo.

I tend to stick to unix timestamps as well, because date formats are 
completely unstandard between different SQL databases.  MySQL's date futzing 
functions are nice, but they're different than Postgres', which are different 
than Oracle's, etc.  

Generally, most of the the math I need to do I can do in PHP either before or 
after grabbing the timestamp.  

I am sure there is a counter point, but this for what I do I just stick to 
timestamps. :-)

-- 
Larry Garfield			AIM: LOLG42
larry@xxxxxxxxxxxxxxxx		ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux