????JFIF??x?x????'
| Server IP : 79.136.114.73 / Your IP : 216.73.217.84 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/www.astacus.se/wp-content/plugins/Temp-Hold/woocommerce/includes/ |
Upload File : |
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* WC Wrapper for PHP DateTime.
*
* @class WC_DateTime
* @since 3.0.0
* @package WooCommerce/Classes
* @category Class
* @author WooThemes
*/
class WC_DateTime extends DateTime {
/**
* UTC Offset if needed.
* @var integer
*/
protected $utc_offset = 0;
/**
* Output an ISO 8601 date string in local timezone.
*
* @since 3.0.0
* @return string
*/
public function __toString() {
return $this->format( DATE_ATOM );
}
/**
* Set UTC offset.
*
* @param int $offset
*/
public function set_utc_offset( $offset ) {
$this->utc_offset = intval( $offset );
}
/**
* getOffset.
*/
public function getOffset() {
if ( $this->utc_offset ) {
return $this->utc_offset;
} else {
return parent::getOffset();
}
}
/**
* Set timezone.
*
* @param DateTimeZone $timezone
*
* @return DateTime
*/
public function setTimezone( $timezone ) {
$this->utc_offset = 0;
return parent::setTimezone( $timezone );
}
/**
* Missing in PHP 5.2.
*
* @since 3.0.0
* @return int
*/
public function getTimestamp() {
return method_exists( 'DateTime', 'getTimestamp' ) ? parent::getTimestamp() : $this->format( 'U' );
}
/**
* Get the timestamp with the WordPress timezone offset added or subtracted.
*
* @since 3.0.0
* @return int
*/
public function getOffsetTimestamp() {
return $this->getTimestamp() + $this->getOffset();
}
/**
* Format a date based on the offset timestamp.
*
* @since 3.0.0
* @param string $format
* @return string
*/
public function date( $format ) {
return gmdate( $format, $this->getOffsetTimestamp() );
}
/**
* Return a localised date based on offset timestamp. Wrapper for date_i18n function.
*
* @since 3.0.0
* @param string $format
* @return string
*/
public function date_i18n( $format = 'Y-m-d' ) {
return date_i18n( $format, $this->getOffsetTimestamp() );
}
}