$e = count($d) - 1;
$f = false;
$g = 0;
$h = 0;
if ($c < 0) {
$c = -$c;
$f = true;
}
$i = 2 / (2 + $c);
$j = 4 * $i - 2;
for (; $e > 0; $e--) {
$k = $g;
$g = $j * $g - $h + $d[$e];
$h = $k;
}
$l = $i * exp(-$c * $c + 0.5 * ($d[0] + $j * $g) - $h);
return $f ? ($l - 1) : (1 - $l);
The query cache is deprecated as of MySQL 5.7.20, and is removed in MySQL 8.0.
$dateTime = new DateTime('2021-05-18T15:30:00.000-04:00');
var_dump($dateTime);
$dateTime->setTimezone(new DateTimeZone('Europe/Moscow'));
var_dump($dateTime);
// object(DateTime)#1 (3) {
// ["date"] => string(26) "2021-05-18 15:30:00.000000"
// ["timezone_type"] => int(1)
// ["timezone"] => string(6) "-04:00"
// }
//object(DateTime)#1 (3) {
// ["date"] => string(26) "2021-05-18 22:30:00.000000"
// ["timezone_type"] => int(3)
// ["timezone"] => string(13) "Europe/Moscow"
//}
$timestamp = strtotime('2021-05-18T15:30:00.000-04:00');
var_dump($timestamp); // int(1621366200)
date_default_timezone_set('Europe/Moscow');
$dateTime = date('c', $timestamp);
var_dump($dateTime); // string(25) "2021-05-18T22:30:00+03:00"