-
-
Notifications
You must be signed in to change notification settings - Fork 434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dashboard Graph is skipping Months in 1y view #3593
Comments
I've tested this on a customer's website and I can confirm: february and september are missing... |
I've also done this: echo $dateStart . "\n";
$dateStart->addMonth(1);
echo $dateStart . "\n";
$dateStart->addMonth(1);
echo $dateStart . "\n";
$dateStart->addMonth(1);
echo $dateStart . "\n";
$dateStart->addMonth(1);
echo $dateStart . "\n";
$dateStart->addMonth(1);
echo $dateStart . "\n";
$dateStart->addMonth(1);
echo $dateStart . "\n";
$dateStart->addMonth(1);
echo $dateStart . "\n";
$dateStart->addMonth(1);
echo $dateStart . "\n";
$dateStart->addMonth(1);
echo $dateStart . "\n";
$dateStart->addMonth(1);
echo $dateStart . "\n";
$dateStart->addMonth(1);
echo $dateStart . "\n"; and it outputs:
it's very broken! |
I'm especially confused about the small steps its doing between:
is that whats called a "month"? ;P i don't know what Zend_Date is doing there |
so, it's a bug with timezone because it you comment out these two lines: $dateStart->setTimezone($timezoneLocal);
$dateEnd->setTimezone($timezoneLocal); then it works as expected |
what if we convert those two lines to: switch ($this->getDataHelper()->getParam('period')) {
case '1y':
case '2y':
break;
default:
$dateStart->setTimezone($timezoneLocal);
$dateEnd->setTimezone($timezoneLocal);
} it seems to work for me |
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
Actual result (*)
The Faulty Code piece:
Results in this data from $dateStart (is there a logic behind this jumps for addMonth?)
and uses this for fields:
this results in the graph missing a few months
Probably solution would be to use DateTime instead of Zend_Date ?
The text was updated successfully, but these errors were encountered: