I'm having trouble changing mysql time to China time, can you help?
SELECT NOW(); on my webhost produces: 2020-02-24 19:52:25
but I am exactly 15 hours ahead of that, it is 2020-02-25 10:52:25
SELECT @@system_time_zone; produces: MST
Apparently, the maximum time I can SET time_zone is '+14:00'
But what I've tried just sets my time column to all zeros.
I have a mysql table called 19OEattendance The last column is time it is a TIMESTAMP
SELECT TIMEDIFF(NOW(), UTC_TIMESTAMP); produces: -07:00:00
I tried:
SET time_zone = 'Shanghai'; produces: #1298 - Unknown or incorrect time zone: 'Shanghai'
How to set the column time to my time, 15 hours in front of the time on my webhost?
I don't think I have access to my.cnf on the webhost. I can't find it.
This ups the attendance. Maybe I can tweak this?? I was hoping LOCAALTIME() would set the sender's time. Alas, no!
$sql = 'UPDATE 19OEattendance SET attendance = attendance + 1,
has_been_incremented = has_been_incremented + 1, time = LOCALTIME()
WHERE number = ' . $_POST['password'] . ' AND has_been_incremented != 1 ;';