aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_strings_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_strings_lib.h')
-rw-r--r--src/include/gnunet_strings_lib.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/include/gnunet_strings_lib.h b/src/include/gnunet_strings_lib.h
index 977c2ead7..2e0c720ee 100644
--- a/src/include/gnunet_strings_lib.h
+++ b/src/include/gnunet_strings_lib.h
@@ -76,7 +76,7 @@ GNUNET_STRINGS_fancy_size_to_bytes (const char *fancy_size,
76 * @param rtime set to the relative time 76 * @param rtime set to the relative time
77 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 77 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
78 */ 78 */
79int 79enum GNUNET_GenericReturnValue
80GNUNET_STRINGS_fancy_time_to_relative (const char *fancy_time, 80GNUNET_STRINGS_fancy_time_to_relative (const char *fancy_time,
81 struct GNUNET_TIME_Relative *rtime); 81 struct GNUNET_TIME_Relative *rtime);
82 82
@@ -91,12 +91,27 @@ GNUNET_STRINGS_fancy_time_to_relative (const char *fancy_time,
91 * @param atime set to the absolute time 91 * @param atime set to the absolute time
92 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 92 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
93 */ 93 */
94int 94enum GNUNET_GenericReturnValue
95GNUNET_STRINGS_fancy_time_to_absolute (const char *fancy_time, 95GNUNET_STRINGS_fancy_time_to_absolute (const char *fancy_time,
96 struct GNUNET_TIME_Absolute *atime); 96 struct GNUNET_TIME_Absolute *atime);
97 97
98 98
99/** 99/**
100 * @ingroup time
101 * Convert a given fancy human-readable time to our internal
102 * representation. The human-readable time is expected to be
103 * in local time, whereas the returned value will be in UTC.
104 *
105 * @param fancy_time human readable string (e.g. %Y-%m-%d %H:%M:%S)
106 * @param atime set to the absolute time
107 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
108 */
109enum GNUNET_GenericReturnValue
110GNUNET_STRINGS_fancy_time_to_timestamp (const char *fancy_time,
111 struct GNUNET_TIME_Timestamp *atime);
112
113
114/**
100 * Convert a given filesize into a fancy human-readable format. 115 * Convert a given filesize into a fancy human-readable format.
101 * 116 *
102 * @param size number of bytes 117 * @param size number of bytes