Re: Re: date() and timezone
| From: | Jochem Maas | Date: | Fri, 15 Dec 2006 14:52:08 +0000 |
| Subject: | Re: Re: date() and timezone | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-245866@lists.php.net to get a copy of this message | ||
Fernando M. M. wrote:
>
>> that will teach not to use global include files to init your apps.
>>
>> even if you we stuck with editing 10,000 scripts (btw it sounds very
> fishy
>> to 10,000 scripts with date() calls in them - can anyone say 'code
> reuse'?)
>> exactly how hard would it be to write something that would go through
> all
>> those php files and add a single line (" ini_set('date.timezone',
> 'Europe/Amsterdam');
>> ")
>> to the top of the script (i.e. just
> after the first '<?php' | '<?') ?
>
> Those scripts are uploaded by a lot
> of people. Unfortunately i can't make all of them change this conf.
I was suggesting you write a script to programmatically hack all the files in question,
but its a moot point you've seen that there is a sane way of tackling the issue.
> But now i know that
> i can change this on .htaccess
>
>
>> if you RTFM (and I mean
> actually READ) then you would know that you
>> can set the relevant date related
> ini settings in a .htaccess file
>> here is the relevant link
> again:
>>
> http://php.net/manual/en/ref.datetime.php#ini.date.timezone
>>
>
> Sorry, i have read it but i was reading the portuguese version and it seens like
> it is not completely translated. Just changed to the english version and NOW i can read
> it :)
ah that explains alot - my advice is always use the english version of the manual if you can,
no disrespect to the many hard-working translators out there but there is almost no chance any
translation team can keep up the number and frequency of updates to the docs.
for the same reason I recommend never using an offline version of the manual unless you
have no other choice.
>
> Thanks,
>
> Fernando.