aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2022-07-08 14:20:42 +0200
committerChristian Grothoff <grothoff@gnunet.org>2022-07-08 14:20:42 +0200
commitc25c6711c6f2df31fea213e6e6f5ac421b8cd6a1 (patch)
treee04df93eb9633102845a5c4342c254e0c52b3ec9 /src/lib
parent0cbac2526ff2287e2cae6d541248393e67ea42f4 (diff)
-change to date_s
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/merchant_api_get_orders.c13
-rw-r--r--src/lib/merchant_api_get_reserves.c1
-rw-r--r--src/lib/merchant_api_get_transfers.c1
3 files changed, 4 insertions, 11 deletions
diff --git a/src/lib/merchant_api_get_orders.c b/src/lib/merchant_api_get_orders.c
index 817c9240..7f08acb6 100644
--- a/src/lib/merchant_api_get_orders.c
+++ b/src/lib/merchant_api_get_orders.c
@@ -273,7 +273,7 @@ TALER_MERCHANT_orders_get2 (
/* build ogh->url with the various optional arguments */
{
- char dstr[30];
+ char *dstr;
bool have_date;
bool have_srow;
char cbuf[30];
@@ -292,13 +292,7 @@ TALER_MERCHANT_orders_get2 (
sizeof (cbuf),
"%llu",
(unsigned long long) start_row);
- // FIXME: use date_s, no need for milliseconds!
- GNUNET_snprintf (dstr,
- sizeof (dstr),
- "%llu",
- (unsigned long long) (date.abs_time.abs_value_us
- / GNUNET_TIME_UNIT_MILLISECONDS.
- rel_value_us));
+ dstr = GNUNET_strdup (GNUNET_TIME_timestamp2s (date));
if (delta > 0)
{
have_date = ! GNUNET_TIME_absolute_is_zero (date.abs_time);
@@ -323,7 +317,7 @@ TALER_MERCHANT_orders_get2 (
(TALER_EXCHANGE_YNA_ALL != wired)
? TALER_yna_to_string (wired)
: NULL,
- "date_ms",
+ "date_s",
(have_date)
? dstr
: NULL,
@@ -340,6 +334,7 @@ TALER_MERCHANT_orders_get2 (
? tbuf
: NULL,
NULL);
+ GNUNET_free (dstr);
}
if (NULL == ogh->url)
{
diff --git a/src/lib/merchant_api_get_reserves.c b/src/lib/merchant_api_get_reserves.c
index 24a527d6..570fc4e5 100644
--- a/src/lib/merchant_api_get_reserves.c
+++ b/src/lib/merchant_api_get_reserves.c
@@ -235,7 +235,6 @@ TALER_MERCHANT_reserves_get (struct GNUNET_CURL_Context *ctx,
rgh->cb_cls = cb_cls;
active_s = TALER_yna_to_string (active);
failures_s = TALER_yna_to_string (failures);
- // FIXME: use different format?
after_s = GNUNET_strdup (GNUNET_TIME_timestamp2s (after));
rgh->url = TALER_url_join (backend_url,
"private/reserves",
diff --git a/src/lib/merchant_api_get_transfers.c b/src/lib/merchant_api_get_transfers.c
index 8938c3d7..275990fc 100644
--- a/src/lib/merchant_api_get_transfers.c
+++ b/src/lib/merchant_api_get_transfers.c
@@ -260,7 +260,6 @@ TALER_MERCHANT_transfers_get (
sizeof (offset_s),
"%lld",
(unsigned long long) offset);
- // FIXME: use other format?
before_s = GNUNET_strdup (GNUNET_TIME_timestamp2s (before));
after_s = GNUNET_strdup (GNUNET_TIME_timestamp2s (after));
gth->url = TALER_url_join (backend_url,