This commit is contained in:
Prospress Inc
2018-12-12 14:48:11 +01:00
committed by Remco Tolsma
parent 37367ac369
commit 721dda6e5c
340 changed files with 5114 additions and 2125 deletions

View File

@@ -168,20 +168,11 @@ abstract class ActionScheduler_Store {
if ( ! $next ) {
throw new InvalidArgumentException( __( 'Invalid schedule. Cannot save action.', 'action-scheduler' ) );
}
$next->setTimezone( $this->get_local_timezone() );
ActionScheduler_TimezoneHelper::set_local_timezone( $next );
return $next->format( 'Y-m-d H:i:s' );
}
/**
* Get the site's local time. Wrapper for ActionScheduler_TimezoneHelper::get_local_timezone().
*
* @return DateTimeZone
*/
protected function get_local_timezone() {
return ActionScheduler_TimezoneHelper::get_local_timezone();
}
/**
* @return array
*/
@@ -207,4 +198,15 @@ abstract class ActionScheduler_Store {
}
return self::$store;
}
/**
* Get the site's local time.
*
* @deprecated 2.1.0
* @return DateTimeZone
*/
protected function get_local_timezone() {
_deprecated_function( __FUNCTION__, '2.1.0', 'ActionScheduler_TimezoneHelper::set_local_timezone()' );
return ActionScheduler_TimezoneHelper::get_local_timezone();
}
}