documented that ngx.now() returns local time while ngx.time() returns GMT time.
This commit is contained in:
Родитель
ad2b41ff65
Коммит
8a06613c7d
|
@ -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`).
|
||||
|
|
Загрузка…
Ссылка в новой задаче