From c3360bcc0a9d27e0744214cb553a6b20e2451ddb Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 18 Jun 2010 22:34:54 +0200 Subject: [PATCH] =?utf8?q?src/utils=5Fparams.c:=20Use=20"gmtime=5Fr"=20rat?= =?utf8?q?her=20than=20"localtime=5Fr"=20=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit … to work around an Apache or FastCGI bug. --- src/utils_params.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils_params.c b/src/utils_params.c index dbe085d..9f1e4e0 100644 --- a/src/utils_params.c +++ b/src/utils_params.c @@ -275,7 +275,10 @@ int time_to_rfc1123 (time_t t, char *buffer, size_t buffer_size) /* {{{ */ struct tm tm_tmp; size_t status; - if (localtime_r (&t, &tm_tmp) == NULL) + /* Apparently Apache or FastCGI doesn't honor the timezone information and + * thus "fixes" the last modified header when the timezone information is + * east of GMT. With "gmtime_r" this problem doesn't occur. */ + if (gmtime_r (&t, &tm_tmp) == NULL) return (errno); status = strftime (buffer, buffer_size, "%a, %d %b %Y %T %z", &tm_tmp); -- 2.30.2