diff options
Diffstat (limited to 'src/http/ngx_http_get_time.c')
-rw-r--r-- | src/http/ngx_http_get_time.c | 13 |
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); +} |