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,如需转载请自行联系原作者
目录
相关文章
|
3月前
|
存储 应用服务中间件 nginx
Nginx入门 -- 基本数据结构中之ngx_str_t,ngx_array_t
Nginx入门 -- 基本数据结构中之ngx_str_t,ngx_array_t
90 0
|
5月前
|
安全 网络安全 数据安全/隐私保护
auth required pam_tally2.so file=/var/log/tallylog onerr=fail deny=3 unlock_time=300 even_deny_root root_unlock_time=300 什么作用?
【8月更文挑战第2天】auth required pam_tally2.so file=/var/log/tallylog onerr=fail deny=3 unlock_time=300 even_deny_root root_unlock_time=300 什么作用?
90 1
|
5月前
|
安全 网络安全 数据安全/隐私保护
auth required pam_tally2.so file=/var/log/tallylog onerr=fail deny=3 unlock_time=300 even_deny_root root_unlock_time=300 什么作用
【8月更文挑战第14天】auth required pam_tally2.so file=/var/log/tallylog onerr=fail deny=3 unlock_time=300 even_deny_root root_unlock_time=300 什么作用
136 0
|
8月前
|
应用服务中间件 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
36 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
1033 1
安装nginx:src/os/unix/ngx_user.c:26:7: error: ‘struct crypt_data’ has no member named ‘curren
PHP当中echo、print、 print_r、var_dump、var_export的异同
PHP当中echo、print、 print_r、var_dump、var_export的异同
|
应用服务中间件 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
|
数据库 Windows
php.ini 配置 max_execution_time 和 FPM 配置 request_terminate_timeout
php.ini 配置 max_execution_time 和 FPM 配置 request_terminate_timeout
|
应用服务中间件
两种方法解决tomcat的 Failed to initialize end point associated with ProtocolHandler ["http-apr-8081"]
两种方法解决tomcat的 Failed to initialize end point associated with ProtocolHandler ["http-apr-8081"]
253 0
|
JSON PHP 数据格式
【PHP】variable type error: array
【PHP】variable type error: array
258 0
【PHP】variable type error: array