Get the value of all the time units in the format that LDAP expects it in.

@return string
961203
public function getLdapValue()
    {
        if ($this->never) {
            $value = self::NEVER;
        } else {
            $total = 0;
            foreach (self::UNIT as $unit => $conversion) {
                $total += $this->$unit * $conversion;
            }
            $value = number_format($total, 0, '.', '');
        }

        return $value;
    }
469057
public function getJsonValue()
    {
        $parts = DateTimeParser::parseVCardDateTime($this->getValue());

        $dateStr =
            $parts['year'].'-'.
            $parts['month'].'-'.
            $parts['date'].'T'.
            $parts['hour'].':'.
            $parts['minute'].':'.
            $parts['second'];

        // Timezone
        if (!is_null($parts['timezone'])) {
            $dateStr .= $parts['timezone'];
        }

        return [$dateStr];
    }
742220
public function getJsonValue()
    {
        $dts = $this->getDateTimes();
        $hasTime = $this->hasTime();
        $isFloating = $this->isFloating();

        $tz = $dts[0]->getTimeZone();
        $isUtc = $isFloating ? false : in_array($tz->getName(), ['UTC', 'GMT', 'Z']);

        return array_map(
            function (DateTimeInterface $dt) use ($hasTime, $isUtc) {
                if ($hasTime) {
                    return $dt->format('Y-m-d\\TH:i:s').($isUtc ? 'Z' : '');
                } else {
                    return $dt->format('Y-m-d');
                }
            },
            $dts
        );
    }
973783
public function toString() {
		$txt = $this->getId ();
		$data = $this->getDataRaportu ();
		if ($data instanceof \DateTime) {
			$txt .= $this->getDataRaportu ()->format ( "Y-m-d" );
		} else {
			$txt .= $this->getDataRaportu ();
		}
		return $txt;
	}
1181073
public function getAllTimeFormatFlat()
    {
        $aOut     = [];
        $aFormats = $this->getAllTimeFormat();

        foreach ($aFormats as $oFormat) {
            $aOut[$oFormat->slug] = $oFormat->label;
        }

        return $aOut;
    }
639883
public static function getAll()
    {
        $timezones = [];
        $identifiers = DateTimeZone::listIdentifiers();
        foreach ($identifiers as $identifier) {
            $date = new DateTime("now", new DateTimeZone($identifier));
            $offsetText = $date->format("P");
            $offsetInHours = $date->getOffset() / 60 / 60;
            $timezones[] = [
                "identifier" => $identifier,
                "name" => "(GMT{$offsetText}) $identifier",
                "offset" => $offsetInHours
            ];
        }

        ArrayHelper::multisort($timezones, "offset", SORT_ASC, SORT_NUMERIC);
        return $timezones;
    }
755719
public function ToString()
	{
		$result = "";
		$format = "H:i:s";

		if ( ! @empty( $this->Value->microseconds != 0 ) )
		{
			$format .= "." . rtrim( $this->Value->microseconds, "0" );
		}

		if ( ! $this->IsLocal )
		{
			$format .= $this->Value->getOffset() == 0
	   		 	? "\Z"
	   			: "P";
		}

		return $this->Value->format( $format );
	}
1172282
public function getUnits()
    {
        return [
            self::UNIT_NONE   => 'None',
            self::UNIT_MINUTE => 'Minutes',
            self::UNIT_HOUR   => 'Hours',
            self::UNIT_DAY    => 'Days',
            self::UNIT_WEEK   => 'Weeks',
            self::UNIT_MONTH  => 'Months',
            self::UNIT_YEAR   => 'Years',
        ];
    }
169693
public function getTimeFormat()
    {
        if ($this->getHTML5()) {
            // Browsers expect ISO 8601 times, localisation is handled on the client
            $this->setTimeFormat(DBTime::ISO_TIME);
        }

        if ($this->timeFormat) {
            return $this->timeFormat;
        }

        // Get from locale
        return $this->getFrontendFormatter()->getPattern();
    }
462022
public function getTimezone()
    {
        if(!$timezone = $this->getUser()->getLanguage()) {
            $timezone = $this->getConfig()->timezone;
        }

        return $timezone;
    }
876364
public function getFormatted()
    {
        if ($this->getUnit() != "") {
            return $this->getValue() . " " . $this->getUnit();
        } else {
            return (string)$this->getValue();
        }
    }
1190713
public function toDateISOLocal() : string
    {
        if ($this->timezoneIsLocal) {
            $that = $this;
        } else {
            $that = (clone $this)->setTimezone(static::$timezoneLocal);
        }
        return $that->format('Y-m-d');
    }
147210
public function toIso8601String()
    {
        $parts = [];

        if ($this->recurrences !== null) {
            $parts[] = 'R'.$this->recurrences;
        }

        $parts[] = $this->startDate->toIso8601String();

        $parts[] = $this->dateInterval->spec();

        if ($this->endDate !== null) {
            $parts[] = $this->endDate->toIso8601String();
        }

        return implode('/', $parts);
    }
683501
public function getTimerTime()
    {
        if ($this->fltTimeStart == -1) {
            return $this->fltTime;
        }
        return $this->fltTime + microtime(true) - $this->fltTimeStart;
    }
911586
private function getTzDelta()
    {
        if (is_null($this->tzDelta)) {
            /** @var \Magento\Framework\Stdlib\DateTime\DateTime $dt */
            $dt = $this->manObj->get(\Magento\Framework\Stdlib\DateTime\DateTime::class);
            $this->tzDelta = $dt->getGmtOffset();
        }
        return $this->tzDelta;
    }
1361120
protected function keyUnitsById() {
    $keyed_units = array();
    foreach ($this->units as $unit) {
      $keyed_units[$unit->getUnitId()] = $unit;
    }

    return $keyed_units;
  }
881642
public function formatTimeStamp()
    {
        $log = '';
        $className = \OxidEsales\Eshop\Core\Registry::getConfig()->getActiveView()->getClassName();
        $log .= "<div id='" . $className . "_executed'>Executed: " . date('Y-m-d H:i:s') . "</div>";
        $log .= "<div id='" . $className . "_timestamp'>Timestamp: " . microtime(true) . "</div>";

        return $log;
    }