$Stroke = $Year.'-'.$Month.'-'.$Day.' '.$Hours.':'.$Minutes.':'.$Seconds;
$format = 'Y-m-d H:i:s';
$date = DateTime::createFromFormat($format, $Stroke);
if ($Format == ''){
$Format = 'd.m.Y H:i:s';
}
$result = $date->format($Format);
$date = DateTime::createFromFormat($format, $Stroke, new DateTimeZone('Europe/Moscow'));