summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/include/ldb.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-01-02 10:59:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:35:52 -0500
commit71bc79caab7f9510151b31846755cc4db7b81ec0 (patch)
tree581ae742af0a88514f0ad9e6a185d4c43724de8f /source4/lib/ldb/include/ldb.h
parentaf384475056d3cdbf9a31b9a02782e1afd9e641f (diff)
downloadsamba-71bc79caab7f9510151b31846755cc4db7b81ec0.tar.gz
samba-71bc79caab7f9510151b31846755cc4db7b81ec0.tar.bz2
samba-71bc79caab7f9510151b31846755cc4db7b81ec0.zip
r20462: add functions to handle UTCTime strings
metze (This used to be commit 49c7da812c290e23bb65b98a2710fb90c4a0ece2)
Diffstat (limited to 'source4/lib/ldb/include/ldb.h')
-rw-r--r--source4/lib/ldb/include/ldb.h36
1 files changed, 31 insertions, 5 deletions
diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h
index 1e2a6b0bbd..4f8ee1f941 100644
--- a/source4/lib/ldb/include/ldb.h
+++ b/source4/lib/ldb/include/ldb.h
@@ -1550,9 +1550,9 @@ void ldb_msg_remove_attr(struct ldb_message *msg, const char *attr);
/**
Convert a time structure to a string
- This function converts a time_t structure to an LDAP formatted time
- string.
-
+ This function converts a time_t structure to an LDAP formatted
+ GeneralizedTime string.
+
\param mem_ctx the memory context to allocate the return string in
\param t the time structure to convert
@@ -1564,8 +1564,8 @@ char *ldb_timestring(void *mem_ctx, time_t t);
/**
Convert a string to a time structure
- This function converts an LDAP formatted time string to a time_t
- structure.
+ This function converts an LDAP formatted GeneralizedTime string
+ to a time_t structure.
\param s the string to convert
@@ -1573,6 +1573,32 @@ char *ldb_timestring(void *mem_ctx, time_t t);
*/
time_t ldb_string_to_time(const char *s);
+/**
+ Convert a time structure to a string
+
+ This function converts a time_t structure to an LDAP formatted
+ UTCTime string.
+
+ \param mem_ctx the memory context to allocate the return string in
+ \param t the time structure to convert
+
+ \return the formatted string, or NULL if the time structure could
+ not be converted
+*/
+char *ldb_timestring_utc(void *mem_ctx, time_t t);
+
+/**
+ Convert a string to a time structure
+
+ This function converts an LDAP formatted UTCTime string
+ to a time_t structure.
+
+ \param s the string to convert
+
+ \return the time structure, or 0 if the string cannot be converted
+*/
+time_t ldb_string_utc_to_time(const char *s);
+
void ldb_qsort (void *const pbase, size_t total_elems, size_t size, void *opaque, ldb_qsort_cmp_fn_t cmp);
#endif