summaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/ngx_core.h1
-rw-r--r--src/core/ngx_parse_time.c (renamed from src/http/ngx_http_parse_time.c)3
-rw-r--r--src/core/ngx_parse_time.h22
3 files changed, 24 insertions, 2 deletions
diff --git a/src/core/ngx_core.h b/src/core/ngx_core.h
index a279c81d6..6b317056a 100644
--- a/src/core/ngx_core.h
+++ b/src/core/ngx_core.h
@@ -54,6 +54,7 @@ typedef void (*ngx_connection_handler_pt)(ngx_connection_t *c);
#include <ngx_process.h>
#include <ngx_user.h>
#include <ngx_parse.h>
+#include <ngx_parse_time.h>
#include <ngx_log.h>
#include <ngx_alloc.h>
#include <ngx_palloc.h>
diff --git a/src/http/ngx_http_parse_time.c b/src/core/ngx_parse_time.c
index 985af3172..831cc71bf 100644
--- a/src/http/ngx_http_parse_time.c
+++ b/src/core/ngx_parse_time.c
@@ -7,13 +7,12 @@
#include <ngx_config.h>
#include <ngx_core.h>
-#include <ngx_http.h>
static ngx_uint_t mday[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
time_t
-ngx_http_parse_time(u_char *value, size_t len)
+ngx_parse_http_time(u_char *value, size_t len)
{
u_char *p, *end;
ngx_int_t month;
diff --git a/src/core/ngx_parse_time.h b/src/core/ngx_parse_time.h
new file mode 100644
index 000000000..aa542ebf5
--- /dev/null
+++ b/src/core/ngx_parse_time.h
@@ -0,0 +1,22 @@
+
+/*
+ * Copyright (C) Igor Sysoev
+ * Copyright (C) Nginx, Inc.
+ */
+
+
+#ifndef _NGX_PARSE_TIME_H_INCLUDED_
+#define _NGX_PARSE_TIME_H_INCLUDED_
+
+
+#include <ngx_config.h>
+#include <ngx_core.h>
+
+
+time_t ngx_parse_http_time(u_char *value, size_t len);
+
+/* compatibility */
+#define ngx_http_parse_time(value, len) ngx_parse_http_time(value, len)
+
+
+#endif /* _NGX_PARSE_TIME_H_INCLUDED_ */