FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Date/Time warning
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Date/Time warning [message #177758 is a reply to message #177756] Fri, 20 April 2012 09:27 Go to previous message
Torsten Jrgensen is currently offline  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...
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: php include, function, ...
Next Topic: session question
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Dec 01 02:36:32 GMT 2024

Total time taken to generate the page: 0.04009 seconds