403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/currency/lib/compatible/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/currency/lib/compatible/tools.php
<?php

namespace Bitrix\Currency\Compatible;

use Bitrix\Main;

/**
 * Class Tools
 * Provides various useful methods for old api.
 *
 * @package Bitrix\Currency\Compatible
 */
class Tools
{
	protected static string $datetimeTemplate;

	/**
	 * Return datetime template for old api emulation.
	 *
	 * @internal
	 *
	 * @return string
	 */
	public static function getDatetimeExpressionTemplate(): string
	{
		if (!isset(self::$datetimeTemplate))
		{
			$helper = Main\Application::getConnection()->getSqlHelper();
			$format = Main\Context::getCurrent()->getCulture()->getDateTimeFormat();
			$datetimeFieldName = '#FIELD#';
			$datetimeField = $datetimeFieldName;
			if (\CTimeZone::enabled())
			{
				$diff = \CTimeZone::getOffset();
				if ($diff !== 0)
				{
					$datetimeField = $helper->addSecondsToDateTime($diff, $datetimeField);
				}
				unset($diff);
			}
			self::$datetimeTemplate = str_replace(
				['%', $datetimeFieldName],
				['%%', '%1$s'],
				$helper->formatDate($format, $datetimeField)
			);
			unset($datetimeField, $datetimeFieldName, $format, $helper);
		}

		return self::$datetimeTemplate;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit