I'm archiving website events, and want to store times for when things happen.
My server is set to UTC.
I want them to be saved in the database in the user's time, so if someone in the UK does something at 7:30pm on Dec 14 2015, I want it to look like:
2015-12-14 19:30:00
or preferably
2015-12-14 19:30pm
However, when I test here in Australia, it saves my time in UTC time for both DATETIME and TIMESTAMP
eg if I do something my time 6pm, it saves it as 8am.
I don't want it in UTC - I want it saved as their time, so when browsing the db, I can see what time their activity occurred in their timezone, without having to know what their timezone was.
To do this, do I have to use something client side to get their local time or timezone, or is there something in php that can figure out which timezone they are in, so I can get a time() value and adjust it before archiving?
Thanks for your time and help.