Via SSH I print the current date of my server, which is correct based on my location:
When I run SHOW GLOBAL VARIABLES
on MySQL, I have time_zone = SYSTEM
- which makes me think MySQL will be using the system date and time.
However, when I run SELECT CURRENT_TIME
it returns to me a result that looks like it's in another time zone (ignore the diff in minutes due to the time I took between both snapshots):
Is there any other necessary configuration to make CURRENT_TIME
in MySQL reflect exactly the same system date time?
SELECT NOW();
andSHOW VARIABLES LIKE 'time_zone'
to see you session's variable value. – Jehad Keriaki Feb 15 '18 at 20:47SELECT NOW();
returned the time four hours less than the System hour andSHOW VARIABLES LIKE 'time_zone'
returnedSYSTEM
– Adriano Castro Feb 16 '18 at 10:14