Re: Date/Time warning [message #177758 is a reply to message #177756] |
Fri, 20 April 2012 09:27 |
Torsten Jrgensen
Messages: 16 Registered: April 2012
Karma:
|
Junior Member |
|
|
On 2012-04-20 09:23:02 +0000, Tim Streater said:
> In article <2012042008442967926-info@stconinccom>,
> Torsten Jørgensen <info(at)stconinc(dot)com> wrote:
>
>> I get a warning about timezones when using date(). Is there something
>> new in PHP, I've just migrated from one mac to another.
>
> You've upgraded to a version that needs it. I do this in any CLI PHp
> script I run, if I'm going to use any time/date function:
>
> $timezone = getHosttimezone (); // Ask system for time zone
> date_default_timezone_set ($timezone);
>
> Since most of my scripts are run by apache, I also do this in the
> httpd.conf file:
>
> php_value date.timezone 'timezone-string'
>
> where you replace timezone-string with the string for your time-zone.
> Under OS X 10.7.3, this file is at:
>
> /private/etc/apache/httpd.conf
>
>
> php.ini.default can be found at:
>
> /private/etc/php.ini.default
>
> You probably want to copy that to php.ini in the same directory and
> then edit as others have suggested.
Massive! Thanks Tim.
/Torsten
--
This time machine is really funky...
|
|
|