I use the following
public function getSimplifiedDtCreation()
return \Yii::$app->formatter->asDateTime($this->dtCreation, ‘M/d/Y HH:mm’);
but for certain value where the date was at the end of December 2021, it is now suddenly returning the value as being in 2022? I’ve check the db and the values are saved properly, as 2021, but the asDateTime is for some reason adding a full year to it. Would anyone have any ideas?
Simply returning return $this->dtCreation; does return the proper value, but then I loose the format I was after.