I tried this quickly like so:

---- Code: 

require_once 'Zend/Loader.php';
Zend_Loader::registerAutoload();

date_default_timezone_set('Europe/Madrid');
$d = new Zend_Date();
$d->set('1977-01-01');

Zend_Debug::dump($d->__toString());

---- Output:

string(23) "Jan 1, 1977 12:00:00 AM"

array(15) {
  [0] => string(36) "/home/eedition/public_html/index.php"
  [1] => string(38) "/home/eedition/public_html/_config.php"
  [2] => string(55)
"/home/eedition/application/includes/globalfunctions.php"
  [3] => string(51) "/home/eedition/application/includes/Zend/Loader.php"
  [4] => string(49) "/home/eedition/application/includes/Zend/Date.php"
  [5] => string(60)
"/home/eedition/application/includes/Zend/Date/DateObject.php"
  [6] => string(51) "/home/eedition/application/includes/Zend/Locale.php"
  [7] => string(58)
"/home/eedition/application/includes/Zend/Locale/Format.php"
  [8] => string(56)
"/home/eedition/application/includes/Zend/Locale/Data.php"
  [9] => string(56)
"/home/eedition/application/includes/Zend/Locale/Math.php"
  [10] => string(64)
"/home/eedition/application/includes/Zend/Locale/Math/PhpMath.php"
  [11] => string(68)
"/home/eedition/application/includes/Zend/Locale/Data/Translation.php"
  [12] => string(59)
"/home/eedition/application/includes/Zend/Date/Exception.php"
  [13] => string(54)
"/home/eedition/application/includes/Zend/Exception.php"
  [14] => string(50) "/home/eedition/application/includes/Zend/Debug.php"
}

----

No errors here.

I downloaded this yesterday, it's ZendFramework-1.5.2 also.

Some other info that might be helpful.

-- Php ver:
PHP 5.2.6 (not in safe mode)

-- What about tzdata? 
tzdata-2007h-1.el5 (centos 5)

-- Systems knows what timezone that is? 
~zdump -v -c 2008 Europe/Madrid
Europe/Madrid  Tue Jan 19 03:14:07 2038 UTC = Tue Jan 19 04:14:07 2038 CET
isdst=0 gmtoff=3600

Not sure what else. Hope that helps a little.

Terre


________________________________

From: Xavier Vidal Piera [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 22, 2008 11:13 AM
To: Zend Framework General
Subject: [fw-general] Date Warning


Hi Thomas

Here it is that snippet :P

in bootstrap:

date_default_timezone_set('Europe/Madrid');

In controller:

$d = new Zend_Date();
$d->set('1977-01-01');

And a warning it's thrown :


<strong>[Sys Warning]</strong> timezone_open() [<a
href='function.timezone-open'>function.timezone-open
</a>]: Unknown or bad timezone (1977)

Can you reproduce it?

In ZF 1.5.1 there was no warning, i remember....







>>Hy Xavier, 

>>Setting the default timezone does not invoke the object of Zend_Date. 
>>Please give a reproducable code snippet. 

>>Generally you will receive such warnings when you try to do: 
>>$date->setTimezone(somethingwhichisnotatimezone); 
>>And also when you are using you own error-handler as those get also 
>>suppressed warnings. 

>>Greetings 
>>Thomas 
>>I18N Team Leader 

----- Original Message ----- 
From: "Xavier Vidal Piera" <[EMAIL PROTECTED]
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=17374505&i=0> > 
To: "Zend Framework General" <[EMAIL PROTECTED]
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=17374505&i=1> > 
Sent: Wednesday, May 21, 2008 6:37 PM 
Subject: [fw-general] Date warning 



> When i'm using Zend_Date objects, now, with ZF 1.5.2 i'm getting this 
> warning: 
> 
> timezone_open() function.timezone-open: Unknown or bad timezone (1977) 
> 
> 
> In my bootstrap i have this line: 
> 
> date_default_timezone_set('Europe/Madrid'); 
> 
> My PHP version is 5.2.3 
> 
> The timezone is supported as PHP site says 
> http://es2.php.net/manual/es/timezones.europe.php
> 
> Anyone knows how to solve this and remove that warning? 
> 
> Thanks 
> 
> -- 
> Xavier Vidal Piera 
> Enginyer Tècnic Informàtic de Gestió 
> Tècnic Especialista Informàtic d'equips 
> [EMAIL PROTECTED]
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=17374505&i=2>  
> [EMAIL PROTECTED]
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=17374505&i=3>  
> http://web.xaviervidal.net <http://web.xaviervidal.net/> 
> 610.68.41.78 
> 
... [show rest of quote
<http://www.nabble.com/Date-warning-td17373083.html#> ]


-- 
Xavier Vidal Piera
Enginyer Tècnic Informàtic de Gestió
Tècnic Especialista Informàtic d'equips
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://web.xaviervidal.net
610.68.41.78 

Reply via email to