MiniCodeMonkey / amazon-alexa-php

Amazon Alexa PHP Library
99 stars 70 forks source link

alexa api changes with datetime #5

Open rjcrystal opened 7 years ago

rjcrystal commented 7 years ago

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.

alexbde commented 7 years ago

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.