I have the DateTime format: 2016-04-06T15:17:42.97074Z
that I obtained from v5 on the twitch api.
I need to turn this into the unix timestamp for comparison using PHP.
This is currently how I'm attempting the conversion into a DateTime object: $dateTime = DateTime::createFromFormat(DateTime::ISO8601, $json["created_at"]);
, I have also tried using DateTime::W3C
but to no avail.
$json["created_at"]
definitely contains the time to convert as echo $json["created_at"]
returns the time.