aboutsummaryrefslogtreecommitdiffstats
path: root/src/database.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2019-06-03 16:18:29 +0300
committerTimo Teräs <timo.teras@iki.fi>2019-06-03 16:19:17 +0300
commit1c47f374434aa66fb6620199fd027b96cee446e6 (patch)
tree3d0c4acc813efd5fd40a1b9d83d1be3e96037856 /src/database.c
parent37fbafcd928c466c82c892a7868d686d710e5d07 (diff)
downloadapk-tools-1c47f374434aa66fb6620199fd027b96cee446e6.tar.bz2
apk-tools-1c47f374434aa66fb6620199fd027b96cee446e6.tar.xz
use fixed system time in test mode to have fixed test output
fixes test suite regression from previous commit
Diffstat (limited to 'src/database.c')
-rw-r--r--src/database.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/database.c b/src/database.c
index 5bffb43..4e41f21 100644
--- a/src/database.c
+++ b/src/database.c
@@ -624,7 +624,7 @@ int apk_cache_download(struct apk_database *db, struct apk_repository *repo,
char tmpcacheitem[128], *cacheitem = &tmpcacheitem[tmpprefix.len];
apk_blob_t b = APK_BLOB_BUF(tmpcacheitem);
int r, fd;
- time_t now = time(NULL);
+ time_t now = apk_time();
apk_blob_push_blob(&b, tmpprefix);
if (pkg != NULL)
@@ -1005,7 +1005,7 @@ static int apk_db_scriptdb_write(struct apk_database *db, struct apk_ostream *os
char filename[256];
apk_blob_t bfn;
int r, i;
- time_t now = time(NULL);
+ time_t now = apk_time();
list_for_each_entry(ipkg, &db->installed.packages, installed_pkgs_list) {
pkg = ipkg->pkg;