Files
woocommerce-subscriptions/includes/libraries/action-scheduler/classes/ActionScheduler_DateTime.php
Prospress Inc 1039aec2d9 2.3.2
2018-07-19 12:14:08 +02:00

21 lines
449 B
PHP
Executable File

<?php
/**
* ActionScheduler DateTime class.
*
* This is a custom extension to DateTime that
*/
class ActionScheduler_DateTime extends DateTime {
/**
* Get the unix timestamp of the current object.
*
* Missing in PHP 5.2 so just here so it can be supported consistently.
*
* @return int
*/
public function getTimestamp() {
return method_exists( 'DateTime', 'getTimestamp' ) ? parent::getTimestamp() : $this->format( 'U' );
}
}