Home > Archive > PHP PEAR Questions and Answers > January 2005 > Heavy need for action at Pear::Date
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Heavy need for action at Pear::Date
|
|
|
| I write here because I've got no responces at pear-general and in the
bugtracker.
The problem is that bugfixes for Date and Date_TimeZone apparently have
been stalled for quite a while now, which leaves the packages more or
less useless in php5: This is fatal as there is no other proper way of
handling dates with timezones and dates before epoch in php.
However, as the bug is caused by the parse-by-reference of function
arguments of type "object", it should be easy to fix (both in Date and
in Date_TimeZone).
See further details here:
http://pear.php.net/bugs/bug.php?id=2217
If larger projects should be able to use pear::Date and
pear::Date_TimeZone for php5 a new release containing a bugfix is needed
very soon! How can such a release be brought forward?
Thanks
| |
| Pierre-Alain Joye 2005-01-19, 8:58 am |
| On Wed, 12 Jan 2005 18:32:08 +0100
skrald@amossen.dk (Tmp) wrote:
> If larger projects should be able to use pear::Date and
> pear::Date_TimeZone for php5 a new release containing a bugfix is
> needed very soon! How can such a release be brought forward?
I already replied in the bug tracker.
Second fixing this issue without BC and keeping TS issues is not a
quick task.
--Pierre
| |
|
| > I already replied in the bug tracker.
Yes, I can see a reply from late august 2004. In your reply you wrote:
> We should restore the TZ var to their original status.
As I have noted in the comments, this is not a thread safe solution. The
arguments has to be cloned in order to take care of the critical region.
> Second fixing this issue without BC and keeping TS issues is not a
> quick task.
I don't know what you mean with "TS". Regarding to BC, there are two cases:
* php4: Objects are here parsed by value and is therefore automatically
cloned. Fixing the bug (by cloning arguments as the first thing in the
function body) will therefore leave an equivalent and functioning
implementation - regarding to php4.
* php5: Objects are parsed by reference. By cloning the arguments we
obtain a situation equivalent to the php4-case, which does not have the
problem.
In both the php4 and php5 cases I see no BC issues.
If you are en lack of time I will gladly provide a patch, if this can
boost a new release, with a bugfix, soon.
Regards
| |
| Pierre-Alain Joye 2005-01-19, 8:58 am |
| On Wed, 19 Jan 2005 12:40:51 +0100
skrald@amossen.dk (Tmp) wrote:
> In both the php4 and php5 cases I see no BC issues.
>
> If you are en lack of time I will gladly provide a patch, if this
> can boost a new release, with a bugfix, soon.
I have no solution right now for the thread issues using TZ
environment. Everything I read about possible fixes do not work, so
if you have something new, post it in the bug comments.
Well, I have one for php5 which does not depend on pear::date
neither on the TZ env variables.
Thanks for your feedbacks,
Regards,
--Pierre
| |
|
| Hi Pierre,
thanks for the quick responce!
> I have no solution right now for the thread issues using TZ
> environment. Everything I read about possible fixes do not work, so
> if you have something new, post it in the bug comments.
In our company, we simply did the clone-trick, I mentioned in my last post
and we have not had any problems.
The bug can be exactly pointed to multiple modifications of the same
object where some of the modifications are assumed to be for some
local-scope only.
Can you enlighten me on why, simply cloning function arguments where
needed, will not compleetely solve the problem? As I mentioned in the
previous mail, this would leave an implementation equivalent to the
php4-interpretation.
I am interested to help getting rid of this bug, so if you could post the
technical difficulties for the solution, we might come up with a fix.
Thanks!
|
|
|
|
|