When running my PHP Unit tests, MySQL has started adding one hour to an inserted datetime field, causing tests to fail. I am outputting the SQL command that is getting run, and it looks fine:
INSERT INTO xxx (...,
appointmentDateTime
)
VALUES(...,
'2030-01-01 00:00:00'
)
But when I look in my MySQL GUI (both Sequel Pro and Sequel Ace), it is showing 2030-01-01 01:00:00
— it is adding one hour!
When I copy paste that command into MySQL GUI and run it, it gets inserted correctly and does not add one hour.
The field type is DATETIME
.
I restarted my computer, this didn’t resolve it.
My computer is set to the proper timezone.
Running SELECT @@global.time_zone;
shows SYSTEM
.
Running echo date_default_timezone_get();
in my test shows my correct timezone.
My Mac O/S is up to date.
I don’t think this used to happen.
How can this be?