diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-02-12 18:09:38 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-02-12 18:09:38 +0100 |
commit | 88f323a71e891c609874d1bb4fa11acebbb72ac0 (patch) | |
tree | 4017ddeb46c2b4e32b1254db2150c995c693b745 /src/backend/taler-merchant-httpd_proposal.c | |
parent | bf7fe7355d52461c9480979682e9c108f20a0822 (diff) | |
download | merchant-88f323a71e891c609874d1bb4fa11acebbb72ac0.tar.gz merchant-88f323a71e891c609874d1bb4fa11acebbb72ac0.tar.bz2 merchant-88f323a71e891c609874d1bb4fa11acebbb72ac0.zip |
round time before converting to JSON, otherwise GNUnet lib crashes
Diffstat (limited to 'src/backend/taler-merchant-httpd_proposal.c')
-rw-r--r-- | src/backend/taler-merchant-httpd_proposal.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/taler-merchant-httpd_proposal.c b/src/backend/taler-merchant-httpd_proposal.c index 86648dbb..0552d7ea 100644 --- 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 */ |