I have a commenting system on my website which displays the date and time of when something was commented. I have used this method to do it at the moment:
date_default_timezone_set("Europe/London");
echo $date = "posted on " . date("Y-m-d") . " at " . date("H:i:s") . "<br><br>";
I had to set the timezone to Europe/London because otherwise when the website is on the server; it gets the time for whichever timezone that is set on the server.
I set it to Europe/London because that's where my site is appealed at (people in the UK). However I would like for the time to be gotten based on the viewer's local time. Is there any possible way of doing this other than a load of if statements for every single country in the world lol, that would take too long.