============================
* Drupal version: 5.2
* PHP version: 5.2.4-0.dotdeb.1
* Database type and version: 5.0.45
* Release version of MySite: 5.x.2.15
============================

It seems like the submission date and time of any element (submitted by !author on !time), is always the current date and time. At least, that's what I see at my site, and at the demo site as well.

A bug?

Comments

agentrickard’s picture

Status: Active » Reviewed & tested by the community

Well that's just a stupid bug on my part.

Line 29 of teasers.theme should be changed:

        $output .= t('submitted by !author on !time', array('!author' => $author, '!time' => format_date(time(), 'medium')));

To:

        $output .= t('submitted by !author on !time', array('!author' => $author, '!time' => format_date($element['date'], 'medium')));
Marc Bijl’s picture

Thanks for the quick reply + solution.

Good to have the code already,
so I can change it manually.

Cheers,
Marc

Marc Bijl’s picture

As you might possibly know (ha, ha ;) I prefer to have "date created" as ordering element (instead of "date changed").
- http://drupal.org/node/199238

And the same way, I prefer to show this date in the submission info (I guess no surprise).
To achieve this, I've also changed two lines of code in (this case) node.inc:
 
 
 
First change (line 109):

 $sql = db_rewrite_sql("SELECT n.nid, n.changed FROM {node} n WHERE n.type = '%s' AND n.status = 1 ORDER BY n.changed DESC");

Into:

 $sql = db_rewrite_sql("SELECT n.nid, n.created FROM {node} n WHERE n.type = '%s' AND n.status = 1 ORDER BY n.created DESC");

 
 
 
Second change (line 124):

 $items[$i]['date'] = $node->changed;

Into:

 $items[$i]['date'] = $node->created;

 
 
 
May be good to know for other people who have the same preferences as I have.
And may be of some little help when -possibly- adding some functionality as suggested in ;)
- http://drupal.org/node/199238

Best wishes,
Marc

agentrickard’s picture

Agreed. There are just some larger issues that need fixing first.

agentrickard’s picture

Status: Reviewed & tested by the community » Fixed

Fixed in HEAD. The request for changing sort values per user is a different issue.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.