Hi!
I was using Zend Framework 1.0.3
Into my code there are situations where I use some month calculation like
this:
$dt = new Zend_Date();
$dt->subMonth(5);
After update to version 1.5, this code doesn't work anymore.
Doing some comparison with version 1.0.3, I could see that the function
which manipulates the month calculation includes the function
'DateObject::mktime' it has a boolean parameter called 'gmt'. On version
1.0.3, internally this parameter was false when I call the functions
'subMonth' ou 'addMonth'. On version 1.0.4 and 1.5 the 'gmt' parameter
passed to true and consequently internally the 'DateObject::mktime' use the
php function gmmktime.
I'm having problems after this modification, because the gmmktime is
returning me a wrong date. I tried this code:
date_default_timezone_set('America/Sao_Paulo');
$dategmt = @gmmktime(0, 0, 0, 3, 18, 2008);
$datemk = @mktime(0, 0, 0, 3, 18, 2008);
... and the return of gmmktime is 3 hour less then mktime, and the date get
back to the day before.
My question is: Am I doing something wrong? Somebody knows the reason of why
the gmmktime is used instead mktime on version 1.0.4 and 1.5 ?
Thank you for help!
Regards
Thiago
--
View this message in context:
http://www.nabble.com/Zend_Date-and-GMT-problem-tp16122102s16154p16122102.html
Sent from the Zend Framework mailing list archive at Nabble.com.