diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-04-01 11:28:20 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-04-01 11:28:20 +0200 |
commit | 9b729aceb6e02c3a8ef7a8f0b010cd32263da33c (patch) | |
tree | 43102b4fa0c2669dd15646fd4724c758c1b7198a /src/lib | |
parent | cc802c04911560ba85a8aa021f0a80c4fa99815a (diff) | |
download | merchant-9b729aceb6e02c3a8ef7a8f0b010cd32263da33c.tar.gz merchant-9b729aceb6e02c3a8ef7a8f0b010cd32263da33c.tar.bz2 merchant-9b729aceb6e02c3a8ef7a8f0b010cd32263da33c.zip |
implement #6816: use more sane format for date argument in GET /private/orders request
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/merchant_api_get_orders.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/lib/merchant_api_get_orders.c b/src/lib/merchant_api_get_orders.c index c7b04ab2..e593b908 100644 --- a/src/lib/merchant_api_get_orders.c +++ b/src/lib/merchant_api_get_orders.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2014-2018, 2020 Taler Systems SA + Copyright (C) 2014-2018, 2020, 2021 Taler Systems SA TALER is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software @@ -272,7 +272,7 @@ TALER_MERCHANT_orders_get2 ( /* build ogh->url with the various optional arguments */ { - const char *dstr; + char dstr[30]; bool have_date; bool have_srow; char cbuf[30]; @@ -291,7 +291,11 @@ TALER_MERCHANT_orders_get2 ( sizeof (cbuf), "%llu", (unsigned long long) start_row); - dstr = GNUNET_STRINGS_absolute_time_to_string (date); + GNUNET_snprintf (dstr, + sizeof (dstr), + "%llu", + date.abs_value_us + / GNUNET_TIME_UNIT_MILLISECONDS.rel_value_us); if (delta > 0) { have_date = (0 != date.abs_value_us); @@ -317,7 +321,7 @@ TALER_MERCHANT_orders_get2 ( (TALER_EXCHANGE_YNA_ALL != wired) ? TALER_yna_to_string (wired) : NULL, - "date", + "date_ms", (have_date) ? dstr : NULL, |