We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug Creating a DynamoDB table results in an exception being thrown from the internal timestamp parsing code.
Version of AWS SDK for PHP? 3.144.0 to 3.144.2 (latest)
Version of PHP (php -v)? 7.4.7
php -v
To Reproduce (observed behavior)
Using DynamoDB Local…
<?php $client = new DynamoDbClient([ 'credentials' => new Credentials('TheseCredentials', 'DontMatter'), 'endpoint' => 'http://localhost:8000', 'region' => 'eu-west-1', 'version' => '2012-08-10', ]); $client->createTable([ 'AttributeDefinitions' => [ [ 'AttributeName' => 'subject_id', 'AttributeType' => 'S', ], [ 'AttributeName' => 'timestamp', 'AttributeType' => 'N', ], ], 'BillingMode' => 'PAY_PER_REQUEST', 'KeySchema' => [ [ 'AttributeName' => 'subject_id', 'KeyType' => 'HASH', ], [ 'AttributeName' => 'timestamp', 'KeyType' => 'RANGE', ], ], 'TableName' => 'events', ]);
This results in the following exception:
Aws\Api\Parser\Exception\ParserException: Invalid timestamp value passed to DateTimeResult::fromTimestamp /path/to/vendor/aws/aws-sdk-php/src/Api/DateTimeResult.php:53 /path/to/vendor/aws/aws-sdk-php/src/Api/Parser/JsonParser.php:48 /path/to/vendor/aws/aws-sdk-php/src/Api/Parser/JsonParser.php:24 /path/to/vendor/aws/aws-sdk-php/src/Api/Parser/JsonParser.php:24 /path/to/vendor/aws/aws-sdk-php/src/Api/Parser/JsonParser.php:24 /path/to/vendor/aws/aws-sdk-php/src/Api/Parser/JsonRpcParser.php:49 /path/to/vendor/aws/aws-sdk-php/src/Api/Parser/JsonRpcParser.php:36 /path/to/vendor/aws/aws-sdk-php/src/Api/Parser/Crc32ValidatingParser.php:44 /path/to/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php:125 /path/to/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php:92 /path/to/vendor/guzzlehttp/promises/src/Promise.php:203 /path/to/vendor/guzzlehttp/promises/src/Promise.php:156 /path/to/vendor/guzzlehttp/promises/src/TaskQueue.php:47 /path/to/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php:155 /path/to/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php:182 /path/to/vendor/guzzlehttp/promises/src/Promise.php:246 /path/to/vendor/guzzlehttp/promises/src/Promise.php:223 /path/to/vendor/guzzlehttp/promises/src/Promise.php:267 /path/to/vendor/guzzlehttp/promises/src/Promise.php:225 /path/to/vendor/guzzlehttp/promises/src/Promise.php:267 /path/to/vendor/guzzlehttp/promises/src/Promise.php:225 /path/to/vendor/guzzlehttp/promises/src/Promise.php:62 /path/to/vendor/aws/aws-sdk-php/src/AwsClientTrait.php:58 /path/to/vendor/aws/aws-sdk-php/src/AwsClientTrait.php:86 /path/to/testcase.php:
Expected behavior The table is created.
Screenshots N/A
Additional context N/A
The text was updated successfully, but these errors were encountered:
Thank you so much for pointing this out @jaikdean
We just pushed a fix for this issue with today's release and it should be working now.
Sorry, something went wrong.
If anyone else finds this - you're missing "date_default_timezone_set($timezone);"
Successfully merging a pull request may close this issue.
Describe the bug
Creating a DynamoDB table results in an exception being thrown from the internal timestamp parsing code.
Version of AWS SDK for PHP?
3.144.0 to 3.144.2 (latest)
Version of PHP (
php -v
)?7.4.7
To Reproduce (observed behavior)
Using DynamoDB Local…
This results in the following exception:
Expected behavior
The table is created.
Screenshots
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: