summaryrefslogtreecommitdiff
path: root/lib/util/time.h
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-02-22 17:59:51 +1100
committerAndrew Bartlett <abartlet@samba.org>2011-03-01 02:13:22 +0100
commit608c8e787253f01b24f95c1523187a0a37737691 (patch)
treee2af06e52df5d4aee47a8c0efb55f650b6725efe /lib/util/time.h
parentdb11e6505e3205700fe323c550a72df825830f4b (diff)
downloadsamba-608c8e787253f01b24f95c1523187a0a37737691.tar.gz
samba-608c8e787253f01b24f95c1523187a0a37737691.tar.bz2
samba-608c8e787253f01b24f95c1523187a0a37737691.zip
lib/util/time: Merge time functions from source3/lib/time.c
Diffstat (limited to 'lib/util/time.h')
-rw-r--r--lib/util/time.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/util/time.h b/lib/util/time.h
index 345382b80a..3a406340f4 100644
--- a/lib/util/time.h
+++ b/lib/util/time.h
@@ -119,12 +119,29 @@ _PUBLIC_ time_t pull_dos_date2(const uint8_t *date_ptr, int zone_offset);
_PUBLIC_ time_t pull_dos_date3(const uint8_t *date_ptr, int zone_offset);
/**
+ Return a date and time as a string (optionally with microseconds)
+
+ format is %Y/%m/%d %H:%M:%S if strftime is available
+**/
+
+char *timeval_string(TALLOC_CTX *ctx, const struct timeval *tp, bool hires);
+
+/**
+ Return the current date and time as a string (optionally with microseconds)
+
+ format is %Y/%m/%d %H:%M:%S if strftime is available
+**/
+char *current_timestring(TALLOC_CTX *ctx, bool hires);
+
+/**
return a HTTP/1.0 time string
**/
_PUBLIC_ char *http_timestring(TALLOC_CTX *mem_ctx, time_t t);
/**
Return the date and time as a string
+
+ format is %a %b %e %X %Y %Z
**/
_PUBLIC_ char *timestring(TALLOC_CTX *mem_ctx, time_t t);