Q on a "fix" for Date::TimeZone
| From: | jsWalter | Date: | Thu, 15 Jan 2004 03:50:51 +0000 |
| Subject: | Q on a "fix" for Date::TimeZone | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-25071@lists.php.net to get a copy of this message | ||
I wanted TX to give me the default TZ as set by the server when I did
this...
$tz = new Date_TimeZone ();
So I did this...
I modified line 107...
function Date_TimeZone($id = NULL)
and added this IF block at the top of the method...
if ( $id == NULL )
{
$this = $this->getDefault();
return $this;
}
I have 3 questions about this:
1) will this break lot of things?
2) is this not the way to do it?
yes, I know about Date_TimeZone::getDefault().
To me 'new TimeZone()' seemed like a logial way to invoke this class
and pull the default.
3) if this is kosher, how can I propose a change to the Class to incorporate
it?
Thanks
Walter
BTW: I have env 'TZ' set on my windows box and this works fine, as well as
on my Linux box.