mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 04:03:26 +00:00
Fixes for timezone [skip ci]
This commit is contained in:
@@ -34,6 +34,10 @@ class ChartController extends BaseController
|
|||||||
$start = Session::get('start');
|
$start = Session::get('start');
|
||||||
$end = Session::get('end');
|
$end = Session::get('end');
|
||||||
|
|
||||||
|
\Log::debug('Draw home account chart.');
|
||||||
|
\Log::debug('From: '.$start.' ('.$start->timezone.')');
|
||||||
|
\Log::debug('Until: '.$end);
|
||||||
|
|
||||||
if (is_null($account)) {
|
if (is_null($account)) {
|
||||||
// get, depending on preferences:
|
// get, depending on preferences:
|
||||||
/** @var \Firefly\Helper\Preferences\PreferencesHelperInterface $prefs */
|
/** @var \Firefly\Helper\Preferences\PreferencesHelperInterface $prefs */
|
||||||
@@ -59,6 +63,7 @@ class ChartController extends BaseController
|
|||||||
];
|
];
|
||||||
|
|
||||||
foreach ($accounts as $account) {
|
foreach ($accounts as $account) {
|
||||||
|
\Log::debug('Now building series for ' . $account->name);
|
||||||
$data['series'][] = $this->_chart->account($account, $start, $end);
|
$data['series'][] = $this->_chart->account($account, $start, $end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -19,7 +19,9 @@ class Chart implements ChartInterface
|
|||||||
$current = clone $start;
|
$current = clone $start;
|
||||||
$today = new Carbon;
|
$today = new Carbon;
|
||||||
$return = ['name' => $account->name, 'id' => $account->id, 'data' => []];
|
$return = ['name' => $account->name, 'id' => $account->id, 'data' => []];
|
||||||
|
|
||||||
while ($current <= $end) {
|
while ($current <= $end) {
|
||||||
|
\Log::debug('Now at day: ' . $current . '('.$current->timestamp.'), ('.($current->timestamp * 1000).') ');
|
||||||
if ($current > $today) {
|
if ($current > $today) {
|
||||||
$return['data'][] = [$current->timestamp * 1000, $account->predict(clone $current)];
|
$return['data'][] = [$current->timestamp * 1000, $account->predict(clone $current)];
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user