Maybe I'm not thinking logically about this. I have a date and time which I want to convert to a UTC timestamp. This date and time are in an array of timezones.
So for example, I have 15 May 2019 15:45 (Singapore) and 15 May 2019 07:45 Los Angeles.
I want to convert these to the UTC time as at the time it was when these locations were at this time and store this unix timestamp.
So I have converted the date and time via strtotime, I've changed timezones and can echo out the UTC time correctly but can't get the timestamp of this.
date_default_timezone_set("Pacific/Auckland");
$Local = strtotime('22-05-2019 23:55');
echo $Local . "<br>";
echo date('d m Y H:i', $Local) .'<hr>';
date_default_timezone_set("UTC");
echo(date("Y-d-m TG:i:sz", $Local) . "<br />");
$S = strtotime(date('d-m-Y H:i', $Local));
echo $S;