diff --git a/src/DistroqueryAPI.cpp b/src/DistroqueryAPI.cpp index 37919b4..3109837 100644 --- a/src/DistroqueryAPI.cpp +++ b/src/DistroqueryAPI.cpp @@ -160,7 +160,13 @@ json DistroqueryAPI::getRepositoryPackages(string repository, int per_page, int } json package; package["name"] = reinterpret_cast(sqlite3_column_text(stmt,sqlite3_find_column_id(stmt, NULL, "name"))); + package["version"] = reinterpret_cast(sqlite3_column_text(stmt,sqlite3_find_column_id(stmt, NULL, "version"))); + package["release"] = reinterpret_cast(sqlite3_column_text(stmt,sqlite3_find_column_id(stmt, NULL, "release"))); package["summary"] = reinterpret_cast(sqlite3_column_text(stmt,sqlite3_find_column_id(stmt, NULL, "summary"))); + auto itt = (time_t)sqlite3_column_int(stmt,sqlite3_find_column_id(stmt, NULL, "buildtime")); + ostringstream ss; + ss << std::put_time(gmtime(&itt), "%FT%TZ"); + package["buildtime"] = ss.str(); packages.push_back(package); } sqlite3_finalize(stmt);