public function __construct($dateTime, DateTimeZone $zone = null) { parent::__construct($dateTime); if ($zone) { $this->dateTime->setTimezone($zone); } }
public function __construct($timestamp) { $month_day = date('j', $timestamp); $month = date('n', $timestamp); $year = date('Y', $timestamp); $this->timestamp = $timestamp; parent::__construct($month_day, $month, $year); }
public function __construct($datetime = null, $tz = '') { parent::__construct($datetime); if ($tz == '') { $this->setTZ(date_default_timezone_get()); } else { $this->setTZ($tz); } }
public function __construct($datetime = null, $tz = '') { parent::__construct($datetime); if ($tz == '') { $this->setTZ(w2PgetConfig('system_timezone', 'UTC')); } else { $this->setTZ($tz); } }
/** * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate */ public function __construct(\Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate) { parent::__construct($localeDate); $this->_localToNormalFilter = new \Zend_Filter_LocalizedToNormalized(['date_format' => $this->_localeDate->getDateTimeFormat(\IntlDateFormatter::SHORT)]); $this->_normalToLocalFilter = new \Zend_Filter_NormalizedToLocalized(['date_format' => \Magento\Framework\Stdlib\DateTime::DATETIME_INTERNAL_FORMAT]); }
/** * Class constructor method * * @access public * * @return void */ public function __construct() { parent::__construct(current_time('timestamp')); }
public function __construct(array $attributes = []) { parent::__construct($attributes + ['size' => 24, 'class' => 'datetime']); }
function __construct($name) { user_error('Datetime is deprecated. Use SSDatetime instead.', E_USER_NOTICE); parent::__construct($name); }
public function __construct($data = null) { parent::__construct($data); }
function __construct($time = null, $default_format = 'Y-m-d H:i:s') { parent::__construct($time, $default_format); }
/** * Constructor * * @param $name * @param string $label * @param array $attr */ public function __construct($name, $label = '', $from = null, $to = null, $formatDisplay = null, $formatStore = null, $attr = []) { parent::__construct($name, $label, $formatDisplay, $formatStore, $attr); $this->setTo(is_null($to) ? $name . '_to' : $to); $this->setFrom(is_null($from) ? $name . '_from' : $from); }
function __construct($name) { // Debug::show( 'Created SSDatetime: ' . $name ); parent::__construct($name); }