mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Add to update as well.
This commit is contained in:
parent
1bf61f57f5
commit
2138b14d89
@ -481,13 +481,16 @@ class JournalUpdateService
|
|||||||
$value = $this->data[$fieldName];
|
$value = $this->data[$fieldName];
|
||||||
|
|
||||||
if ('date' === $fieldName) {
|
if ('date' === $fieldName) {
|
||||||
if ($value instanceof Carbon) {
|
|
||||||
// update timezone.
|
|
||||||
$value->setTimezone(config('app.timezone'));
|
|
||||||
}
|
|
||||||
if (!$value instanceof Carbon) {
|
if (!$value instanceof Carbon) {
|
||||||
$value = new Carbon($value);
|
$value = new Carbon($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$value->setTimezone(config('app.timezone'));
|
||||||
|
// 2024-11-22, overrule timezone with UTC and store it as UTC.
|
||||||
|
if(FireflyConfig::get('utc', false)) {
|
||||||
|
$value->setTimezone('UTC');
|
||||||
|
}
|
||||||
|
|
||||||
// do some parsing.
|
// do some parsing.
|
||||||
app('log')->debug(sprintf('Create date value from string "%s".', $value));
|
app('log')->debug(sprintf('Create date value from string "%s".', $value));
|
||||||
$this->transactionJournal->date_tz = $value->format('e');
|
$this->transactionJournal->date_tz = $value->format('e');
|
||||||
|
Loading…
Reference in New Issue
Block a user