time support: check and define NDN_CPP_HAVE_GMTIME_SUPPORT. In ndn_toIsoString and ndn_fromIsoString, return an error if not supported.
diff --git a/ndn-cpp/c/util/time.h b/ndn-cpp/c/util/time.h
index b2414c7..75f95df 100644
--- a/ndn-cpp/c/util/time.h
+++ b/ndn-cpp/c/util/time.h
@@ -8,6 +8,7 @@
#define NDN_TIME_H
#include <ndn-cpp/c/common.h>
+#include "../errors.h"
#ifdef __cplusplus
extern "C" {
@@ -24,17 +25,19 @@
* Convert the time from milliseconds to an ISO time string, for example "20131018T184138.423355".
* @param milliseconds The time in milliseconds since 1/1/1970, including fractions of a millisecond.
* @param isoString A buffer of at least 23 bytes to receive the null-terminated ISO time string.
+ * @return 0 for success, else an error code including if we don't have necessary standard library support.
*/
-void
-ndn_toIsoString(ndn_MillisecondsSince1970 time, char *isoString);
+ndn_Error
+ndn_toIsoString(ndn_MillisecondsSince1970 milliseconds, char *isoString);
/**
* Parse the ISO time string and return the time in milliseconds.
* @param isoString The ISO time string, for example "20131018T184138.423355".
- * @return The time in milliseconds since 1/1/1970, including fractions of a millisecond.
+ * @param milliseconds Return the time in milliseconds since 1/1/1970, including fractions of a millisecond.
+ * @return 0 for success, else an error code including if we don't have necessary standard library support.
*/
-ndn_MillisecondsSince1970
-ndn_fromIsoString(const char* isoString);
+ndn_Error
+ndn_fromIsoString(const char* isoString, ndn_MillisecondsSince1970 *milliseconds);
#ifdef __cplusplus
}