This works great in PHP
date_default_timezone_set('my/timezone');
$actualDate = date('Y-m-d');
Now when doing queries, I like to do
INSERT INTO articles (title, insert_date) VALUES ('My Title', now())
The problem with this is the now()
in the MySQL is different to what it would be had it been calculated in PHP (and therefore against the timezone being set).
Is there a way, say a SQL query, to set the default timezone for MySQL?
Thanks