SinisterMotives: I thought I was the only one that knew that secret... now it's out of the bag, everybody is going to be able to do time easily.... now if they just could not learn about setting the locale and printing the date normally to adjust for timezone settings, I could have cornered the market.
FaderMonkey: A great way to handle TIMESTAMP columns is either to alter them into INT columns that are unix timestamps, or if that isn't an option, on each and every select and insert, you can use UNIX_TIMESTAMP(column_name) (for selects) and FROM_UNIXTIME(timestamp) (for inserts/updates). MySQL's date/time functions are really lacking, so I normally just avoid them and use PHP all of the way. It's a lot easier, but still harder than Postgres's full timezone support for it's date/time columns.
|