ngx_time_var

简介:

1、nginx 时间模块:

 

wget https://bitbucket.org/atomd/ngx_time_var/get/393ca2463886.zip

Installation

./configure --add-module=/path/to/ngx_http_time_var_module  --add-module=/path/to/echo_module

Working example:

default_type text/plain;
echo 'year  :$tm_year';
echo 'month :$tm_month';
echo 'day   :$tm_day';
echo 'hour  :$tm_hour';
echo 'minute:$tm_minute';
echo 'second:$tm_second';
echo ''; 
echo $tm_err_log_time;
echo $tm_http_time;
echo $tm_http_log_time;
echo $tm_http_log_iso8601;
echo ''; 
echo $tm_tomsec;
echo $tm_tosec;

Output:

year  :2012
month :01
day   :08
hour  :03
minute:54
second:21

2012/01/08 03:54:21
Sat, 07 Jan 2012 19:54:21 GMT
08/Jan/2012:03:54:21 +0800
2012-01-08T03:54:21+08:00

1325966061.521
1325966061









本文转自 Art_Hero 51CTO博客,原文链接:http://blog.51cto.com/curran/1313149,如需转载请自行联系原作者
目录
相关文章
|
1月前
ES6中的var,let,const
ES6中的var,let,const
|
1月前
|
应用服务中间件 nginx
ngx_http_fastdfs_process_init pid=44362023/05/13 09:31:23 [alert] 2964#0: worker process 4436 exite
ngx_http_fastdfs_process_init pid=44362023/05/13 09:31:23 [alert] 2964#0: worker process 4436 exite
10 0
|
7月前
No module named ‘mdx_math‘
No module named ‘mdx_math‘
57 0
|
Unix 应用服务中间件 nginx
安装nginx:src/os/unix/ngx_user.c:26:7: error: ‘struct crypt_data’ has no member named ‘curren
安装nginx:src/os/unix/ngx_user.c:26:7: error: ‘struct crypt_data’ has no member named ‘curren
855 0
安装nginx:src/os/unix/ngx_user.c:26:7: error: ‘struct crypt_data’ has no member named ‘curren
|
应用服务中间件 nginx
[error] OpenEvent(“Global\ngx_reload_11812“) failed (2: The system cannot find the file specified
[error] OpenEvent(“Global\ngx_reload_11812“) failed (2: The system cannot find the file specified
flAbsPath on /var/lib/dpkg/status failed - realpath
flAbsPath on /var/lib/dpkg/status failed - realpath
93 0
ImportError: cannot import name ‘clock‘ from ‘time‘ (unknown location),已解决
ImportError: cannot import name ‘clock‘ from ‘time‘ (unknown location),已解决
499 0
ImportError: cannot import name ‘clock‘ from ‘time‘ (unknown location),已解决
|
JSON PHP 数据格式
【PHP】variable type error: array
【PHP】variable type error: array
169 0
【PHP】variable type error: array

热门文章

最新文章