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