Hello, I am trying to resolve an issue related to the default ‘date’ field from kirby used in blueprints.
It seems like it is saving a date one hour/day prior to what its value actually is displaying at the time of saving.
review_date:
label: review date
type: date
before: "published on:"
display: YYYY-MM-DD
format: Y-m-d
default: today
I checked the value on the server by overwriting the writeContent function in my custom model
public function writeContent(array $data, string $languageCode = null): bool
{
throw new InvalidArgumentException($data['review_date']);
}
And this is the results:
For debugging’s sake. The client POST request to the server contains the following json-object value:
"review_date":"2021-02-28T23:00:00.000Z"
It does not matter how the value is entered in the field btw, it always gives the same result.
I do live timezone GMT + 1
, so that could be the issue. If so how to resolve this issue?
Using Kirby version 3.4.4
‘composer.json’ entry:
"getkirby/cms": "^3.4.4"