PHP Version 5.0.5 MySql 4.0.25
I am recording an "event" in a mysql database using the type 'datetime'. The date I store is GMT. When I browse, one "event" happened on 2006-03-24 5:14:20 for example.
I, and the server, are based in the UK. At the moment we are currently in BST, or daylight savings time meaning my local time is actually an hour ahead. So when I look up that table, I would really like it to say "2006-03-24 6:14:20".
Alternatively, when someone in Vancouver looks at it, I want it to say "2006-03-23 22:14:20".
I would also like to allow for the daylight saving historically.
"2005-12-20 14:12:12" occured before the clocks went forward, but I am in Daylight saving time when I look it up. In this case I should display the time as it is, without an hour added.
To summarise, I want to display the time that the viewer would have seen, if they looked at their clock as the "event" happened.
I have been totally bamboozled by all the time/date functions, which is why I am asking for help. I cannot decide which is the best way to store the information, or which commands are best to display the date. Indded, do the existing commands handle this international requirement, or would I have to do my own functions!