Hi I’m having a problem with the new 0.9.6 version that wasn’t in 0.9.5. The problem is that I have a snippet that I have called [[documentEditet]] that simply prints the date when the document was, you’ve guessed it, last edited.
The code for the snipet is as follows, as in the example in the documentation (
http://modxcms.com/document-tvs.html):
<?php
$date = $modx->documentObject[’editedon’];
echo strftime("%d/%m/%y %H:%M:%S", $date);
?>
The error I get is: "Error while inserting event log into database."
I don’t get the error if I just echo $date without the strftime function, but then I will just get the timestamp and that is not very useful at all.
Can someone please help me? Am I doing this the wrong way?