Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-16-2008, 09:40 PM
Junior Member
 
Join Date: Jul 2008
Posts: 6
Default Another Zend_Date bug?

After upgrading to version 1.5.2, the following code no longer works:

Code:
$pDate = new Zend_Date(strtotime("07/15/2008"));
echo "before adding 1 month: " .$pDate.PHP_EOL;
$pDate->addMonth(1);
echo "after adding 1 month: " .$pDate.PHP_EOL;

Output:
before adding 1 month: Jul 15, 2008 12:00:00 AM
after adding 1 month: Aug 1, 2008 12:00:00 AM


Using version 1.0.3:
Output:
testing method addMonth
before adding 1 month: Aug 15, 2008 12:00:00 AM
after adding 1 month: Sep 15, 2008 12:00:00 AM




Version 1.5.2 appears to be truncating to the month.

What am I doing wrong?

Last edited by cnemelka : 07-16-2008 at 09:51 PM. Reason: add information
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 08-04-2008, 06:09 PM
Member
 
Join Date: Aug 2008
Posts: 55
Default

There was a bug pre-1.5.3 related to timezone and adding months which had this effect.

It is already fixed... try trunk, 1.5.3 or 1.6
__________________
Greetings
Thomas Weidner
I18N Team Leader, Zend Framework
http://www.thomasweidner.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:40 PM.