[Wylug-help] php date.timezone#

Gary Stainburn gary.stainburn at ringways.co.uk
Mon Sep 17 10:51:35 BST 2007


On Saturday 15 September 2007 10:00, James Holden wrote:
> On Fri, Sep 14, 2007 at 04:11:16PM +0100, Phil Driscoll wrote:
> > Gary
> >
> > The dirty hack is to stick a
> > date_default_timezone_set('Europe/London');
> > before line 420 in /usr/share/squirrelmail/functions/date.php
>
> Dirty, yes... and you'll have to do it every time you upgrade
> squirrelmail.
>
> A less dirty method is to create a file called:
>
> /usr/lib/php/auto_prepend.inc
>
> ...containing:
>
> <?php
> date_default_timezone_set('Europe/London');
> ?>
>
> and add the following to the php.ini file:
>
> auto_prepend_file = /usr/lib/php/auto_prepend.inc
>

Thanks for this. A very nice solution to a problem I should in theory not even 
have.

> > If you insert a phpinfo(); into
> > /usr/share/squirrelmail/functions/date.php you will see what php thinks
> > is the timezone it should use. If it's not Europe/London, then check that
> > PHP is using the php.ini that you think it is.
>
> Quite... it may be looking somewhere else.

I did this *before* the date_default_timezone_set() and before applying the 
solution you suggested.  It is looking at the correct php.ini and it does 
have the correct timezone set.

It's just weird, but at least it's fixed (kinda)

Cheers James and Phil

>
> James
>
> > Cheers
> > --
> > Phil Driscoll
> >
> > _______________________________________________
> > Wylug-help mailing list
> > Wylug-help at wylug.org.uk
> > https://mailman.lug.org.uk/mailman/listinfo/wylug-help

-- 
Gary Stainburn
 
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000     



More information about the Wylug-help mailing list