woocommerce / action-scheduler-custom-tables

This plugin is no longer needed. The custom table code is now part of Action Scheduler version 3.0 and newer. If you're using the latest Action Scheduler, you have the most performant schema available.
https://actionscheduler.org
14 stars 2 forks source link

$date from TimeZone_Helper not used? #59

Closed igorbenic closed 4 years ago

igorbenic commented 4 years ago

Hi,

while working on a site using this tables, I found the code where the ActionScheduler_TimezoneHelper::set_local_timezone is used. The $date that is passed there seems not be used because the set_local_timezone (https://github.com/woocommerce/action-scheduler/blob/master/classes/abstracts/ActionScheduler_TimezoneHelper.php#L18-L32) does not pass $date by reference.

Wouldn't the $date_gmt and $date_local be the same here: https://github.com/Prospress/action-scheduler-custom-tables/blob/master/src/DB_Logger.php#L28-L30 ?

Maybe I am wrong here, but just checking to see if I understand it correctly.

rrennick commented 4 years ago

does not pass $date by reference.

As of PHP 5, by default objects are passed by reference https://www.php.net/manual/en/language.oop5.references.php

Also, this plugin is deprecated in favour of Action Scheduler 3.X which implements an enhanced version of this data store.

igorbenic commented 4 years ago

Thanks for the clarification and a fast response! Closing this then :D