Opened 8 years ago

Closed 6 years ago

#230 closed defect (fixed)

Values of $date_local and $date_gmt variables depend on SSI turned on/off

Reported by: vl Owned by: somebody
Priority: minor Milestone:
Component: nginx-module Version: 1.3.x
Keywords: Cc:
uname -a: Linux vlpc 3.3.8-gentoo #2 SMP Thu Aug 2 16:02:48 MSK 2012 x86_64 Intel(R) Core(TM) i5-3450 CPU @ 3.10GHz GenuineIntel GNU/Linux
nginx -V: nginx version: nginx/1.3.7
built by gcc 4.5.4 (Gentoo 4.5.4 p1.0, pie-0.4.7)
configure arguments: --prefix=/home/vl/tasks/0024-ssi/nginx

Description

The SSI module has $date_local and $date_gmt variables
which contain local/gmt time in format, which is specified
using the SSI variable.Thus, if the SSI was not turned on
for the given request, variables values do not get formatted
as expected, falling back to number of seconds.
Such behavior is inconsistent and should be fixed.

Change History (2)

comment:1 by Maxim Dounin <mdounin@…>, 6 years ago

In 3a8e19528b3098c6dde461dadab07e8cb48f6d91/nginx:

SSI: fixed $date_local and $date_gmt without SSI (ticket #230).

If there is no SSI context in a given request at a given time,
the $date_local and $date_gmt variables used "%s" format, instead
of "%A, %d-%b-%Y %H:%M:%S %Z" documented as the default and used
if there is SSI module context and timefmt wasn't modified using
the "config" SSI command.

While use of these variables outside of the SSI evaluation isn't strictly
valid, previous behaviour is certainly inconsistent, hence the fix.

comment:2 by Maxim Dounin, 6 years ago

Resolution: fixed
sensitive: 0
Status: newclosed

Fixed.

Note: See TracTickets for help on using tickets.