aboutsummaryrefslogtreecommitdiffstats
path: root/main/apk-tools/lua-apk_time.patch
blob: 01b68f369e30d84d9ee35b5c59630e38ca7e31e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/src/lua-apk.c b/src/lua-apk.c
index 532577a..26129fb 100644
--- a/src/lua-apk.c
+++ b/src/lua-apk.c
@@ -37,6 +37,15 @@ struct flagmap opendb_flagmap[] = {
        {NULL, 0}
 };
 
+time_t apk_time(void)
+{
+#ifdef TEST_MODE
+	return 1559567666;
+#else
+	return time(NULL);
+#endif
+}
+
 /* implemented as luaL_typerror until lua 5.1, dropped in 5.2
  * (C) 1994-2012 Lua.org, PUC-Rio. MIT license
  */