aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2017-07-20 23:47:27 +0200
committerMarcello Stanisci <marcello.stanisci@inria.fr>2017-07-20 23:47:27 +0200
commitf3918c1df5a39ebd1a4455edd36ca4ccc35d0cbb (patch)
treed4ce9962cf2d44cecf82f31a6ba3431ab4022380 /src/lib
parent7e05562016e105ed11c3ad6439480310abb780f8 (diff)
fix timestamp issue in lib testcase
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/test_merchant_api.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c
index 428db1ff..69bc4c36 100644
--- a/src/lib/test_merchant_api.c
+++ b/src/lib/test_merchant_api.c
@@ -1976,10 +1976,20 @@ interpreter_run (void *cls)
{
json_t *order;
json_error_t error;
+ struct GNUNET_TIME_Absolute timestamp;
+ char *date;
GNUNET_assert (NULL != (order = json_loads (cmd->details.proposal.order,
JSON_REJECT_DUPLICATES,
&error)));
+
+ timestamp = GNUNET_TIME_absolute_get ();
+ GNUNET_asprintf (&date,
+ "/Date(%llu)/",
+ timestamp.abs_value_us / 1000LL / 1000LL);
+ json_object_set_new (order,
+ "timestamp",
+ json_string (date));
if (NULL != instance)
{
json_t *merchant;
@@ -2479,7 +2489,6 @@ run (void *cls)
\"value\":0,\
\"fraction\":50000000},\
\"order_id\":\"1\",\
- \"timestamp\":\"\\/Date(42)\\/\",\
\"refund_deadline\":\"\\/Date(0)\\/\",\
\"pay_deadline\":\"\\/Date(9999999999)\\/\",\
\"amount\":\
@@ -2515,7 +2524,6 @@ run (void *cls)
\"value\":0,\
\"fraction\":50000000},\
\"order_id\":\"2\",\
- \"timestamp\":\"\\/Date(42)\\/\",\
\"refund_deadline\":\"\\/Date(0)\\/\",\
\"pay_deadline\":\"\\/Date(9999999999)\\/\",\
\"amount\":\