gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-merchant] branch master updated: fix timestamp issue


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] branch master updated: fix timestamp issue in lib testcase
Date: Fri, 21 Jul 2017 00:00:34 +0200

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new f3918c1  fix timestamp issue in lib testcase
f3918c1 is described below

commit f3918c1df5a39ebd1a4455edd36ca4ccc35d0cbb
Author: Marcello Stanisci <address@hidden>
AuthorDate: Thu Jul 20 23:47:27 2017 +0200

    fix timestamp issue in lib testcase
---
 src/lib/test_merchant_api.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c
index 428db1f..69bc4c3 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\":\

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]