commit 88f323a71e891c609874d1bb4fa11acebbb72ac0
parent bf7fe7355d52461c9480979682e9c108f20a0822
Author: Florian Dold <florian.dold@gmail.com>
Date: Sun, 12 Feb 2017 18:09:38 +0100
round time before converting to JSON, otherwise GNUnet lib crashes
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/backend/taler-merchant-httpd_proposal.c b/src/backend/taler-merchant-httpd_proposal.c
@@ -179,7 +179,9 @@ proposal_put (struct MHD_Connection *connection, json_t *order)
if (NULL == json_string_value (json_object_get (order, "timestamp")))
{
- json_object_set (order, "timestamp", GNUNET_JSON_from_time_abs (GNUNET_TIME_absolute_get ()));
+ struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get ();
+ (void) GNUNET_TIME_round_abs (&now);
+ json_object_set (order, "timestamp", GNUNET_JSON_from_time_abs (now));
}
/* extract fields we need to sign separately */