aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_get_time.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2002-12-02 16:09:40 +0000
committerIgor Sysoev <igor@sysoev.ru>2002-12-02 16:09:40 +0000
commita0bb31f92c86a96b3008f9ee320890ee0d920487 (patch)
treeb4b5208a1b3ff66ec7183cb9b02ceffe59f0a0bd /src/http/ngx_http_get_time.c
parent2ba1ee0930adc22206cad54c46fc682485933963 (diff)
downloadnginx-a0bb31f92c86a96b3008f9ee320890ee0d920487.tar.gz
nginx-a0bb31f92c86a96b3008f9ee320890ee0d920487.zip
nginx-0.0.1-2002-12-02-19:09:40 import; resume after 2 months stall
Diffstat (limited to 'src/http/ngx_http_get_time.c')
-rw-r--r--src/http/ngx_http_get_time.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/http/ngx_http_get_time.c b/src/http/ngx_http_get_time.c
new file mode 100644
index 000000000..5885df00b
--- /dev/null
+++ b/src/http/ngx_http_get_time.c
@@ -0,0 +1,13 @@
+
+#include <nginx.h>
+
+#include <ngx_config.h>
+
+
+ngx_http_get_time(char *buf, time_t t)
+{
+ struct tm *tp;
+
+ tp = gmtime(&t);
+ return strftime(buf, 31, "%a, %d %b %Y %H:%M:%S GMT", tp);
+}