diff options
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/time.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/lib/time.c b/source3/lib/time.c index f60af60c7a..c5584fd143 100644 --- a/source3/lib/time.c +++ b/source3/lib/time.c @@ -451,6 +451,21 @@ time_t make_unix_date3(void *date_ptr) return(t); } + +/*************************************************************************** +return a HTTP/1.0 time string + ***************************************************************************/ +char *http_timestring(time_t t) +{ + static char buf[40]; + struct tm *tm = LocalTime(&t); + + strftime(buf, sizeof(buf)-1, "%a, %d %b %Y %H:%M:%S %Z", tm); + return buf; +} + + + /**************************************************************************** return the date and time as a string ****************************************************************************/ |