From 9d72bc3167effcb3aa7e3196bc724bec5be41c6d Mon Sep 17 00:00:00 2001 From: Nadav Har'El Date: Thu, 2 May 2019 00:05:16 +0300 Subject: [PATCH] alternator: table creation time is in seconds The "Timestamp" type returned for CreationDateTime can be one of several things but if it is a number, it is supposed to be the time in *seconds* since the epoch - not in milliseconds. Returning milliseconds as we wrongly did causes boto3 (AWS's Python driver) to throw a parse exception on this response. Signed-off-by: Nadav Har'El --- alternator/executor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alternator/executor.cc b/alternator/executor.cc index b550967148..95fd8dbc25 100644 --- a/alternator/executor.cc +++ b/alternator/executor.cc @@ -113,7 +113,7 @@ static void add_column(schema_builder& builder, sstring name, sstring type, colu } static void supplement_table_info(Json::Value& descr, const schema& schema) { - descr[CREATION_DATE_TIME] = std::chrono::duration_cast(gc_clock::now().time_since_epoch()).count(); + descr[CREATION_DATE_TIME] = std::chrono::duration_cast(gc_clock::now().time_since_epoch()).count(); descr[TABLE_STATUS] = ACTIVE; descr[TABLE_ID] = schema.id().to_sstring().c_str(); }