summaryrefslogtreecommitdiff
path: root/server/src/database.cc
diff options
context:
space:
mode:
authordeva <deva>2008-05-20 10:17:14 +0000
committerdeva <deva>2008-05-20 10:17:14 +0000
commit91d56787bec83a3a7c2ad6afd84d2b82c5d869b9 (patch)
tree32cfe22c3024de280c7516b561b8bfd98b266ac4 /server/src/database.cc
parent7d81d456702e3c5b0caead6e44f2c2f236d2fa41 (diff)
Removed obsolete macro.h and macro_parser.cc,h
Diffstat (limited to 'server/src/database.cc')
-rw-r--r--server/src/database.cc6
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);