From fde9dc80f6e6a5fe4c5856b2ed78e6c024528c43 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 31 Jul 2021 21:40:48 +0200 Subject: -more json_pack cleaning --- src/include/taler_json_lib.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/include') diff --git a/src/include/taler_json_lib.h b/src/include/taler_json_lib.h index 0cbeba082..f338d44ae 100644 --- a/src/include/taler_json_lib.h +++ b/src/include/taler_json_lib.h @@ -52,6 +52,19 @@ TALER_JSON_pack_time_abs (const char *name, struct GNUNET_TIME_Absolute at); +/** + * 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. @@ -66,6 +79,19 @@ TALER_JSON_pack_time_abs_nbo (const char *name, struct GNUNET_TIME_AbsoluteNBO at); +/** + * 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. -- cgit v1.2.3