changeset 991:2e8ba5a5630d

irccd: use current time by default in Util.format
author David Demelier <markand@malikania.fr>
date Wed, 10 Feb 2021 18:17:08 +0100
parents daaf92c097e6
children 462e12e434fb
files irccd/jsapi-util.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/irccd/jsapi-util.c	Wed Feb 10 18:11:46 2021 +0100
+++ b/irccd/jsapi-util.c	Wed Feb 10 18:17:08 2021 +0100
@@ -69,6 +69,9 @@
 	if (!duk_is_object(ctx, index))
 		return;
 
+	/* Use current time by default. */
+	pkg->subst.time = time(NULL);
+
 	duk_enum(ctx, index, 0);
 
 	while (duk_next(ctx, -1, 1)) {