cvs: pear /Date/Date TimeZone.php
| From: | Pierre-Alain Joye | Date: | Sun, 14 Mar 2004 15:17:14 +0000 |
| Subject: | cvs: pear /Date/Date TimeZone.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-17401@lists.php.net to get a copy of this message | ||
pajoye Sun Mar 14 10:17:14 2004 EDT
Modified files:
/pear/Date/Date TimeZone.php
Log:
- fix #967 (http://pear.php.net/bugs/bug.php?id=967)
bad global usage, only $_DATE_TIMEZONE_DEFAULT is used now
http://cvs.php.net/diff.php/pear/Date/Date/TimeZone.php?r1=1.3&r2=1.4&ty=u
Index: pear/Date/Date/TimeZone.php
diff -u pear/Date/Date/TimeZone.php:1.3 pear/Date/Date/TimeZone.php:1.4
--- pear/Date/Date/TimeZone.php:1.3 Sat Jan 4 06:54:54 2003
+++ pear/Date/Date/TimeZone.php Sun Mar 14 10:17:14 2004
@@ -17,7 +17,7 @@
// | |
// +----------------------------------------------------------------------+
//
-// $Id: TimeZone.php,v 1.3 2003/01/04 11:54:54 mj Exp $
+// $Id: TimeZone.php,v 1.4 2004/03/14 15:17:14 pajoye Exp $
//
// Date_TimeZone Class
//
@@ -137,8 +137,8 @@
*/
function getDefault()
{
- global $default;
- return new Date_TimeZone($default);
+ global $_DATE_TIMEZONE_DEFAULT;
+ return new Date_TimeZone($_DATE_TIMEZONE_DEFAULT);
}
/**
@@ -151,9 +151,9 @@
*/
function setDefault($id)
{
- global $default;
+ global $_DATE_TIMEZONE_DEFAULT;
if(Date_TimeZone::isValidID($id)) {
- $default = $id;
+ $_DATE_TIMEZONE_DEFAULT = $id;
}
}
@@ -3626,7 +3626,7 @@
// First try _DATE_TIMEZONE_DEFAULT global,
// then PHP_TZ environment var, then TZ environment var
//
-if(isset($_DATE_TIMEZONE_DEFAULT)
+if(isset($_DATE_TIMEZONE_DEFAULT)
&& Date_TimeZone::isValidID($_DATE_TIMEZONE_DEFAULT)
) {
Date_TimeZone::setDefault($_DATE_TIMEZONE_DEFAULT);