I have a comment section and I wanted the date-time to be shown in the ‘relative’ format.
The problem is that it outputs the inverted version.
So instead of displaying ‘an hour ago’ it shows ‘in an hour’.
The saved timestamp is also older than the date(‘Y-m-d H:i:s’).
Any idea what I did wrong?
For the comment section I’m using the extension ‘comus’.
/* Moved to ‘extensions’ section
The topic is about an extension sjaakp/ yii2-comus. */
To clarify the problem, try using the ‘absolute’ format of date-time. Does it still display the wrong date-time?
Sorry, I didn’t see that I had an answer.
When I use absolute it displays: “AMAM13” and “AMAM36”
(I set ‘datetimeFormat’ => ‘absolute’ in config.)
But when I use default it displays: “in an hour 10/8/20, 12:20”
I have the time zone set to the user’s time zone.