Closed (fixed)
Project:
Views (for Drupal 7)
Version:
5.x-1.6
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Aug 2007 at 17:52 UTC
Updated:
11 Feb 2008 at 23:37 UTC
Jump to comment: Most recent file
Comments
Comment #1
taqwa commentedJust to clarify the problem a little further. When I select Granularity:Day, I understand that the sort order will ignore all other times and just sort by the day of the post. However, it's not doing this. Instead the order seems to be quite random. I also tried making a rule that sorts by Granularity: Year or Granularity: Month, but this causes the view to crash. I just get an empty page with the pager at the bottom.
Comment #2
merlinofchaos commentedOk, I found two problems. Minute granularity was broken due to the confusion between %m -- it's month, not minute. Day granularity was slightly off because it was failing to correct for timezone. Both problems are fixed and checked in; and because I'm feeling generous, here's the patch
Comment #3
meatbites commentedBrilliant! Thanks for providing this, Earl.
I just noticed something, though -- the last argument for DATE_FORMAT under month is
'%Y%m%-- should that have a closing apostrophe?Comment #4
merlinofchaos commentedAck. You're right -- also, there are extraneous % on both 'month' and 'year'. I don't THINK those extra % should cause issues, but it's hard to say.
Updated patch attached. (also committed to -dev).
Comment #5
meatbites commentedThis seems to work well.
The sorts also work when all the percent signs are removed. They're there for a reason, though, I guess...
Comment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #7
asund commentedI couldn't get this to work so i did a bit of testing.
It's strange, but when i changed %Y%m%%d to %Y%m%j it worked fine!
It doesn't really make sense to me, but as long as it works, I'm happy! ;)
EDIT: Rushed to a conclusion there.. still some problems!