documented that ngx.now() returns local time while ngx.time() returns GMT time.

This commit is contained in:
agentzh (章亦春) 2010-11-18 20:02:07 +08:00
Родитель ad2b41ff65
Коммит 8a06613c7d
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -508,15 +508,21 @@ ngx.today()
Returns today's date (in the format `yyyy-mm-dd`) from nginx cached time (no syscall involved unlike Lua's date library).
.
This is the local time.
ngx.now()
-------------
Returns the current timestamp (in the format `yyyy-mm-dd hh:mm:ss`) of the nginx cached time (no syscall involved unlike Lua's date library).
This is the local time.
ngx.time()
----------------
Returns the current timestamp (in seconds) of the nginx cached time (no syscall involved unlike Lua's date library).
This is the GMT time.
ngx.cookie_time(sec)
--------------------
Returns a formated string can be used as the cookie expiration time. The parameter `sec` is the timestamp in seconds (like those returned from `ngx.time`).