Hi Ben,
Sorry we took a bit to get back to you, we were running our own tests. There are a few questions buried in this post and we wanted to catch them all for you. These are great questions by the way.
During our testing, the MySQL command that you provided and the output from the channels tag resulted in the same results but not the same amount of information. For out test we added {ip_address} and were able to see that information. When you say that you get different results, do you mean that you get less information between the two methods or do you get a different amount of results returned and/or different information?
The next question we tested out was to see what constitutes an edit. We found that a simple submission updates the “edit_date” field.
The last question pertained to pulling the username. We were unable to do so, and upon further testing did not find any other way to pull that information into the results. The original author is the only one we get, which is the same result you came up with.
I hope this helps, if you need clarification or have any more questions, please do not hesitate to ask.
Thank you,
Ok, this was helpful.
I think there was bug in 2.2.2 that was not updating the edit_date, as my edit_date was not changing as I made edits to entries. I have now updated to 2.3.1 and it now updates that field when I make a change.
The update, however, didn’t fix everything. Edit_date still does not behave as you would expect.
For example, in my code above, I am outputting the raw (unformatted) date and again using format=:
{edit_date format="%M %n, %Y - %g:%h %a"} // {edit_date}
However, this is what gets outputted:
Jan 1, 2012 - 11:11 am // 20120120150855
Those dates are NOT the same. Jan 20 is being formatted into Jan 1- that is very strange.
Typo: I was outputting Month twice…sorting problem is real tho.
Additionally, and not shockingly, when I try to sort by edit_date, I receive incorrect results. What does work is I run this MySQL command now:
SELECT * FROM `exp_channel_titles` ORDER BY edit_date DESC
Something fishy is going on with edit_date.
Dan, are you able to replicate?