mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-31 12:06:44 +00:00
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 <nyh@scylladb.com>
This commit is contained in:
@@ -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<std::chrono::milliseconds>(gc_clock::now().time_since_epoch()).count();
|
||||
descr[CREATION_DATE_TIME] = std::chrono::duration_cast<std::chrono::seconds>(gc_clock::now().time_since_epoch()).count();
|
||||
descr[TABLE_STATUS] = ACTIVE;
|
||||
descr[TABLE_ID] = schema.id().to_sstring().c_str();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user