aboutsummaryrefslogtreecommitdiff
path: root/src/json/json_generator.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/json/json_generator.c')
-rw-r--r--src/json/json_generator.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/json/json_generator.c b/src/json/json_generator.c
index e660e10c53..98f7163bcc 100644
--- a/src/json/json_generator.c
+++ b/src/json/json_generator.c
@@ -73,6 +73,19 @@ GNUNET_JSON_from_time_abs (struct GNUNET_TIME_Absolute stamp)
/**
+ * Convert absolute timestamp to a json string.
+ *
+ * @param stamp the time stamp
+ * @return a json string with the timestamp in @a stamp
+ */
+json_t *
+GNUNET_JSON_from_time_abs_nbo (struct GNUNET_TIME_AbsoluteNBO stamp)
+{
+ return GNUNET_JSON_from_time_abs (GNUNET_TIME_absolute_ntoh (stamp));
+}
+
+
+/**
* Convert relative timestamp to a json string.
*
* @param stamp the time stamp