Skip to content

Instantly share code, notes, and snippets.

@umidjons
Created July 8, 2013 05:12
Show Gist options
  • Save umidjons/5946362 to your computer and use it in GitHub Desktop.
Save umidjons/5946362 to your computer and use it in GitHub Desktop.
Bitrix: Get current site's date and time formats
<?
// выводит текущую дату в формате текущего сайта
echo date($DB->DateFormatToPHP(CSite::GetDateFormat("SHORT")), time());
// Возвращает формат времени, указанный в настройках сайта.
echo $GLOBALS["DB"]->DateFormatToPHP( CSite::GetTimeFormat() );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment