Re: The Big Date and Time Debacle

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

 



"Stephen Martindale" <stephen@xxxxxxxxxxxxxx> wrote in message 
news:07.0B.45475.8FC98E34@xxxxxxxxxxxxxxx
>I am having great difficulty understanding dates and times with PHP and 
>MySql.
>
> As far as I understand them, the PHP date and time construct is timezone 
> and DST aware, but MySql's DATETIME and TIMESTAMP fields are not. I 
> believe that this is where my confusion originates from.
>
> After searching the web and the docs for hours, I have not managed to find 
> an article that explains how this system works and what the best practices 
> are for an application that may be used in many timezones, some with DST 
> and some without.
>
> Please point me in the direction of a good source on this subject. I am 
> new to PHP, coming from a several-year-long period of C++ and, recently, 
> ASP.NET. (Ok, I admit it, I only started using PHP a week ago!)

I wrote a time class in PHP, and use it to manage all my dates and times. 
Basically, I use an INT to store the timestamp in the database, which is a 
simple timestamp (see PHP functions: time(), date(), strtotime(), mktime(), 
, strftime()).

DanB

-- 
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