summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-07-31 21:40:48 +0200
committerChristian Grothoff <christian@grothoff.org>2021-07-31 21:40:48 +0200
commitfde9dc80f6e6a5fe4c5856b2ed78e6c024528c43 (patch)
tree35d5e52652b38f75a5279fe855cc1d345fe3c1c5 /src/include
parent1d54400a025ff62ad15b77ab117ea5188884b1a1 (diff)
downloadexchange-fde9dc80f6e6a5fe4c5856b2ed78e6c024528c43.tar.gz
exchange-fde9dc80f6e6a5fe4c5856b2ed78e6c024528c43.tar.bz2
exchange-fde9dc80f6e6a5fe4c5856b2ed78e6c024528c43.zip
-more json_pack cleaning
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_json_lib.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/include/taler_json_lib.h b/src/include/taler_json_lib.h
index 0cbeba08..f338d44a 100644
--- a/src/include/taler_json_lib.h
+++ b/src/include/taler_json_lib.h
@@ -54,6 +54,19 @@ TALER_JSON_pack_time_abs (const char *name,
/**
* Generate packer instruction for a JSON field of type
+ * absolute time creating a human-readable timestamp.
+ *
+ * @param name name of the field to add to the object
+ * @param at absolute time to pack
+ * @return json pack specification
+ */
+struct GNUNET_JSON_PackSpec
+TALER_JSON_pack_time_abs_human (const char *name,
+ struct GNUNET_TIME_Absolute at);
+
+
+/**
+ * Generate packer instruction for a JSON field of type
* absolute time in network byte order.
* The absolute time value is expected to be already rounded.
*
@@ -68,6 +81,19 @@ TALER_JSON_pack_time_abs_nbo (const char *name,
/**
* Generate packer instruction for a JSON field of type
+ * absolute time creating a human-readable timestamp.
+ *
+ * @param name name of the field to add to the object
+ * @param at absolute time to pack
+ * @return json pack specification
+ */
+struct GNUNET_JSON_PackSpec
+TALER_JSON_pack_time_abs_nbo_human (const char *name,
+ struct GNUNET_TIME_AbsoluteNBO at);
+
+
+/**
+ * Generate packer instruction for a JSON field of type
* relative time.
* The relative time value is expected to be already rounded.
*