Hello!
I'm having trouble finding a suitable solution to my problem, I hope you can help!
I have a mySQL database, with times and dates stored in it, in this format: 2001-08-01 21:50. What I've done is stored a cookie within users browsers of the time offset value from their region and London, England. The cookie has the offset stored as +5 for 5 hours ahead or -5 for 5 hours behind. What I would like to do is add this offset value of the cookie to my stored time in the database, for example once this is done 2001-08-01 21:50 would now look something like 2001-08-02 01:50 for a 5 hour ahead offset. I've tried a few methods, including spliting the stored times into seperate values like $hour, $minute, $date etc, and added the cookie value, like $hour+5. This has failed to work as with our example, the stored time: 2001-08-01 21:50, turns into 2001-08-01 26:50.
Does anybody have any ideas for a solution?
Thanks in advance!
Azhar Jassal