Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #5590
| From | Torsten Jørgensen <info@stconinc.com> |
|---|---|
| Newsgroups | comp.lang.php |
| Message-ID | <201204201127443209-info@stconinccom> (permalink) |
| References | <2012042008442967926-info@stconinccom> <timstreater-1374D9.10230220042012@news.individual.net> |
| Subject | Re: Date/Time warning |
| Organization | http://www.panic.com/unison/ |
| Date | 2012-04-20 11:27 +0200 |
On 2012-04-20 09:23:02 +0000, Tim Streater said: > In article <2012042008442967926-info@stconinccom>, > Torsten Jørgensen <info@stconinc.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...
Back to comp.lang.php | Previous | Next — Previous in thread | Find similar | Unroll thread
Date/Time warning Torsten Jørgensen <info@stconinc.com> - 2012-04-20 08:44 +0200
Re: Date/Time warning Goran <goran@nospam.com> - 2012-04-20 08:47 +0200
Re: Date/Time warning Torsten Jørgensen <info@stconinc.com> - 2012-04-20 09:12 +0200
Re: Date/Time warning Goran <goran@nospam.com> - 2012-04-20 09:21 +0200
Re: Date/Time warning Torsten Jørgensen <info@stconinc.com> - 2012-04-20 09:49 +0200
Re: Date/Time warning Jerry Stuckle <jstucklex@attglobal.net> - 2012-04-20 08:13 -0400
Re: Date/Time warning Tim Streater <timstreater@greenbee.net> - 2012-04-20 15:43 +0100
Re: Date/Time warning Jerry Stuckle <jstucklex@attglobal.net> - 2012-04-20 14:21 -0400
Re: Date/Time warning Tim Streater <timstreater@greenbee.net> - 2012-04-20 20:31 +0100
Re: Date/Time warning Denis McMahon <denismfmcmahon@gmail.com> - 2012-04-20 15:03 +0000
Re: Date/Time warning Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-04-21 19:09 +0200
Re: Date/Time warning Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-04-21 18:56 +0200
Re: Date/Time warning "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-04-20 09:59 +0200
Re: Date/Time warning Tim Streater <timstreater@greenbee.net> - 2012-04-20 10:23 +0100
Re: Date/Time warning Torsten Jørgensen <info@stconinc.com> - 2012-04-20 11:27 +0200
csiph-web