<?
// source format
$format = "DD.MM.YYYY HH:MI:SS";
// convert to the PHP format
$php_format = $DB->DateFormatToPHP($format); // d.m.Y H:i:s
?>
<?
// print current date in the format of the current site
// obtain the site format
$site_format = CSite::GetDateFormat("SHORT");
// convert to the PHP format
$php_format = $DB->DateFormatToPHP($site_format);
// print current date in the format of the current site
echo date($php_format, time());
?>
<?
// print yesterday's date in the format of the current site
// obtain the site format
$site_format = CSite::GetDateFormat("SHORT");
// convert to the PHP format
$php_format = $DB->DateFormatToPHP($site_format);
// print yesterday's date in the format of the current site
echo date($php_format, time()-86400);
?>