Replies: 0
Hi Guys-
Developer question about WooCommerce and time zones.
On our web server, PHP is set to UTC time, but on our database server, MySQL time is set to “SYSTEM”, which on that server is “America/New York”. We have our own custom child theme code that relies on databse storage in our own tables, so to avoid any time zone mismatches during inserts, we’d like to run a quick “SET timezone = ‘UTC'” MySQL query to make sure the database server and the web server are both using the same time during inserts.
However, since we’re using wpdb, and I presume Woo also uses the same wpdb connection that WordPress sets up on each page load, I just want to make sure that setting the database time in our own code isn’t going to interfere with database inserts that Woo might be doing on the same page load. Will running this query interfere with Woo at all?
More generally, does Woo do anything internally (e.g. like running a “SET timezone” query) to ensure that both Woo php code and the database server it’s connecting to are using the same time zone?
Thanks!