Sometimes sorting by just the created time isn't enough (sometimes heartbeat items could be made several-to-a-second). To sort accurately by when they were added you'd need to order by the auto id column uaid.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nicholasThompson’s picture

Assigned: nicholasThompson » Unassigned
Status: Needs work » Needs review
FileSize
739 bytes

Patch (can be applied using git apply).

Stalski’s picture

Can you tell me how you got identical timestamps? This should not happen.
If you are doing imports or such on cron, please use time() insteadof $_SERVER['request_time'] so all activity is different.
However, I think in drupal 6 I did it that way.

Stalski’s picture

Status: Needs review » Closed (fixed)

I pushed the extra sort handler to git. Thx

nicholasThompson’s picture

Thanks :)
FYI, the identical timestamps are usually caused (in my case) by cron-invoked rules actions.