diff options
Diffstat (limited to 'server/src/database.cc')
-rw-r--r-- | server/src/database.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/src/database.cc b/server/src/database.cc index ad6bbe0..b2d5589 100644 --- a/server/src/database.cc +++ b/server/src/database.cc @@ -41,8 +41,10 @@ Database::~Database() { } -int Database::post(std::string &user, std::string &cpr, std::string &time, Commit &commit) +int Database::post(std::string &user, std::string &cpr, time_t now, Commit &commit) { + char timestamp[32]; + sprintf(timestamp, "%u", now); UID uid; try { @@ -56,7 +58,7 @@ int Database::post(std::string &user, std::string &cpr, std::string &time, Commi uid.toString() + "', '" + commit.macro + "', '" + commit.version + "', '" + - time + "', '" + + timestamp + "', '" + user + "')"; W.exec(sql); |