You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by pascal barbedor <pa...@laposte.net> on 2002/09/06 17:03:32 UTC

Apache::Util::ht_time outputs dates in local language

>
> When I have caching problems, I run my pages through cachability to find
out
> where they are failing. Check it out at:
>
>   http://www.web-caching.com/cgi-web-caching/cacheability.py
>
> It reports on page headers as well as gives useful info like the
following:
>

Hi thanks

this helped me determine why the cache did not work
is it because the date format of Expires or Last-Modified was not RFC
correct

I noted on the occasion that Apache::Util::ht_time()
outputs dates in locale language format (french for me)
Mar, 12 Sept 2002 18:50:20 GMT
instead of english ones


is there a way to correct this ?
thanks
pascal





Re: Apache::Util::ht_time outputs dates in local language

Posted by pascal barbedor <pa...@laposte.net>.

> This function wraps an apache function (apr_ht_time()) which in
> turn uses strftime() to do the conversion.
>
> Try changing your LC_TIME or LANG variable before you start your
> web server.  Perhaps start by setting LANG=C and go from there.
>
> Consult the strftime() man page for details on the interaction
> between the environment variables and the time output.
>
on win XP
I tried "no locale " in the perl script
and LANG=C in ENV before starting Apache

since none worked I just wrote a little function to get correct date in
english
thanks
pascal





Re: Apache::Util::ht_time outputs dates in local language

Posted by Paul Lindner <li...@inuus.com>.
On Fri, Sep 06, 2002 at 05:03:32PM +0200, pascal barbedor wrote:
> >
> > When I have caching problems, I run my pages through cachability to find
> out
> > where they are failing. Check it out at:
> >
> >   http://www.web-caching.com/cgi-web-caching/cacheability.py
> >
> > It reports on page headers as well as gives useful info like the
> following:
> >
> 
> Hi thanks
> 
> this helped me determine why the cache did not work
> is it because the date format of Expires or Last-Modified was not RFC
> correct
> 
> I noted on the occasion that Apache::Util::ht_time()
> outputs dates in locale language format (french for me)
> Mar, 12 Sept 2002 18:50:20 GMT
> instead of english ones

This function wraps an apache function (apr_ht_time()) which in
turn uses strftime() to do the conversion.

Try changing your LC_TIME or LANG variable before you start your
web server.  Perhaps start by setting LANG=C and go from there.

Consult the strftime() man page for details on the interaction
between the environment variables and the time output.

Cheers,
Paul

-- 
Paul Lindner    lindner@inuus.com   ||||| | | | |  |  |  |   |   |

    mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
         Human Rights Declaration   http://www.unhchr.ch/udhr/