This commit is contained in:
James Cole
2025-09-16 21:09:29 +02:00
parent 956d4e09c3
commit cb6b3d5f85
6 changed files with 11 additions and 11 deletions

View File

@@ -38,7 +38,7 @@ class CurrencyExchangeRate extends Model
use ReturnsIntegerUserIdTrait; use ReturnsIntegerUserIdTrait;
use SoftDeletes; use SoftDeletes;
protected $fillable = ['user_id', 'from_currency_id', 'to_currency_id', 'date', 'date_tz', 'rate']; protected $fillable = ['user_id','user_group_id', 'from_currency_id', 'to_currency_id', 'date', 'date_tz', 'rate'];
public function fromCurrency(): BelongsTo public function fromCurrency(): BelongsTo
{ {

View File

@@ -40,8 +40,8 @@ class AutoBudgetCronjob extends AbstractCronjob
/** @var Configuration $config */ /** @var Configuration $config */
$config = FireflyConfig::get('last_ab_job', 0); $config = FireflyConfig::get('last_ab_job', 0);
$lastTime = (int) $config->data; $lastTime = (int) $config->data;
$diff = Carbon::now()->getTimestamp() - $lastTime; $diff = now(config('app.timezone'))->getTimestamp() - $lastTime;
$diffForHumans = today(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true); $diffForHumans = now(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true);
if (0 === $lastTime) { if (0 === $lastTime) {
Log::info('Auto budget cron-job has never fired before.'); Log::info('Auto budget cron-job has never fired before.');
} }

View File

@@ -46,8 +46,8 @@ class BillWarningCronjob extends AbstractCronjob
/** @var Configuration $config */ /** @var Configuration $config */
$config = FireflyConfig::get('last_bw_job', 0); $config = FireflyConfig::get('last_bw_job', 0);
$lastTime = (int) $config->data; $lastTime = (int) $config->data;
$diff = Carbon::now()->getTimestamp() - $lastTime; $diff = now(config('app.timezone'))->getTimestamp() - $lastTime;
$diffForHumans = today(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true); $diffForHumans = now(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true);
if (0 === $lastTime) { if (0 === $lastTime) {
Log::info('The bill notification cron-job has never fired before.'); Log::info('The bill notification cron-job has never fired before.');

View File

@@ -40,8 +40,8 @@ class ExchangeRatesCronjob extends AbstractCronjob
/** @var Configuration $config */ /** @var Configuration $config */
$config = FireflyConfig::get('last_cer_job', 0); $config = FireflyConfig::get('last_cer_job', 0);
$lastTime = (int) $config->data; $lastTime = (int) $config->data;
$diff = Carbon::now()->getTimestamp() - $lastTime; $diff = now(config('app.timezone'))->getTimestamp() - $lastTime;
$diffForHumans = today(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true); $diffForHumans = now(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true);
if (0 === $lastTime) { if (0 === $lastTime) {
Log::info('Exchange rates cron-job has never fired before.'); Log::info('Exchange rates cron-job has never fired before.');
} }

View File

@@ -46,8 +46,8 @@ class RecurringCronjob extends AbstractCronjob
/** @var Configuration $config */ /** @var Configuration $config */
$config = FireflyConfig::get('last_rt_job', 0); $config = FireflyConfig::get('last_rt_job', 0);
$lastTime = (int) $config->data; $lastTime = (int) $config->data;
$diff = Carbon::now()->getTimestamp() - $lastTime; $diff = now(config('app.timezone'))->getTimestamp() - $lastTime;
$diffForHumans = today(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true); $diffForHumans = now(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true);
if (0 === $lastTime) { if (0 === $lastTime) {
Log::info('Recurring transactions cron-job has never fired before.'); Log::info('Recurring transactions cron-job has never fired before.');

View File

@@ -46,8 +46,8 @@ class WebhookCronjob extends AbstractCronjob
/** @var Configuration $config */ /** @var Configuration $config */
$config = FireflyConfig::get('last_webhook_job', 0); $config = FireflyConfig::get('last_webhook_job', 0);
$lastTime = (int) $config->data; $lastTime = (int) $config->data;
$diff = Carbon::now()->getTimestamp() - $lastTime; $diff = now(config('app.timezone'))->getTimestamp() - $lastTime;
$diffForHumans = today(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true); $diffForHumans = now(config('app.timezone'))->diffForHumans(Carbon::createFromTimestamp($lastTime), null, true);
if (0 === $lastTime) { if (0 === $lastTime) {
Log::info('The webhook cron-job has never fired before.'); Log::info('The webhook cron-job has never fired before.');