Hi! Could we please enable some services and cookies to improve your experience and our website?
Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code
<?php
$user_agent = $_SERVER['HTTP_USER_AGENT'];
$timezone = null;
if (preg_match('/\b(?:MSIE|Chrome|Safari|Firefox)\b/', $user_agent) && preg_match('/\(([^\)]+)\)/', $user_agent, $matches)) {
$timezone = $matches[1];
}
if ($timezone) {
$timezone = str_replace(':', '', $timezone);
date_default_timezone_set($timezone);
}
$endTime ='1679846700';
$sechas = strtotime(date('H:i:s'));
$ostalos = round(abs($endTime - $sechas) / 60);
$time_diff_ms = $ostalos * 60 * 1000;
echo $time_diff_ms;