amazon-alexa-php
amazon-alexa-php copied to clipboard
alexa api changes with datetime
The alexa testing tool now sends unix timestamp as timestamp in request rather than formatted date. which causes failed to parse string exception and crashes the application.
Just for people looking for a quick workaround:
Changing line 18 in Request.php from
$this->timestamp = new DateTime($data['request']['timestamp']);
to
$this->timestamp = DateTime::createFromFormat('U', $data['request']['timestamp']);
solves this issue.