Notes created in Tripwire have one date format for posted and another for edited

Issue #169 resolved
Trent created an issue

When posting notes, the date format is in MM/DD/YYYY HH:MM:SS format.

If the note is edited, it showed the edit timestamp in the format YYYY-MM-DD HH:MM:SS.

Here isa an example of how this displays on an edit note:

Edited by Sanxion at 10/31/2016 09:47:30 Posted by Sanxion at 2016-10-31 09:28:14

Comments (6)

  1. Steven Harrigan

    I don't have a environment up to test this, but to make it even easier for anyone that does and wants to tackle this, I'm pretty sure all that needs to be changed is this line:

    https://bitbucket.org/daimian/tripwire/src/7a349da33d756768517984d44a33d39915ebab31/comments.php?at=master&fileviewer=file-view-default#comments.php-49

    You simply change DATE_FORMAT(modified, \'%m/%d/%Y %h:%i:%s\') to DATE_FORMAT(modified, \'%Y-%m-%d %h:%i:%s\') and that should be all that's needed to make the two dates consistent.

  2. Kraesk

    There is actually three places you want to make the above change to, one is in comments.php at line 49, the other two are in refresh.php... 587 and 709 are the lines specifically.

  3. Log in to comment