From e8e19585ab5863da8e12b6c5faebea4d5024d0d7 Mon Sep 17 00:00:00 2001 From: ezeeetm Date: Sat, 21 Mar 2020 20:02:13 -0400 Subject: [PATCH] fixes #480 --- aws-python-rest-api-with-dynamodb/todos/create.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/aws-python-rest-api-with-dynamodb/todos/create.py b/aws-python-rest-api-with-dynamodb/todos/create.py index 6044abd3a..4fcece062 100644 --- a/aws-python-rest-api-with-dynamodb/todos/create.py +++ b/aws-python-rest-api-with-dynamodb/todos/create.py @@ -3,7 +3,6 @@ import os import time import uuid -from datetime import datetime import boto3 dynamodb = boto3.resource('dynamodb') @@ -15,7 +14,7 @@ def create(event, context): logging.error("Validation Failed") raise Exception("Couldn't create the todo item.") - timestamp = str(datetime.utcnow().timestamp()) + timestamp = str(time.time()) table = dynamodb.Table(os.environ['DYNAMODB_TABLE'])