I am using the following code to submit the UTC_TIMESTAMP to a MySQL database:
$logq = "INSERT INTO logs (Name, Page, Date) VALUES ('$user', '$page', UTC_TIMESTAMP())";
I am in the UK and the time is currently one hour ahead of the UTC_TIMESTAMP, so I would like to add one hour to the values entered, but I’m not sure how to do this. I tried a couple of suggestions found on Stack Overflow, but both don’t work. Could someone let me know how to do this correctly? Also, I am not sure how to handle daylight saving time. Is there a way of accounting for this automatically?
Thanks,
Nick
1 Answer