Hi

I have installed ed_classified on Drupal, but would like to switch the date format to the UK version in the "expires on" part of the listing,

eg. it current says "expires on Sun, 07/06/2008" but I would like it to say "expires on Sun, 06/07/2008", or even 6th July 2008.

I had a look through all the files, but could work out how to change it. I saw

I thought that it might have been changing this part of ed_classified.module, and switched 'n/j/y' to 'j/n/y' but that did not change anything:

$result = pager_query($sql, 50);
$time = time();
while ($ad = db_fetch_object($result)) {
$expired = ed_classified_ad_expired($ad,$time);
$fields = array(
array('data' => l($ad->title, "node/$ad->nid")),
array('data' => format_date($ad->created, 'custom', 'n/j/y'), 'nowrap'=> 'nowrap'),
array('data' => $ad->status ? t('yes') : t('no')),
array('data' => $expired ? t('expired') : format_date($ad->expires, 'custom', 'n/j/y', $ad->expires_on) . t(' (').format_interval($ad->expires_on-$time, 2) .t(')'), 'nowrap' => 'nowrap',
'class'=>$expired ? 'classified-expired-flag' : 'classified-unexpired-flag'));
if ($showstats) {
$fields[] = array('data' => $ad->totalcount);
$fields[] = array('data' => $ad->daycount);
}
$fields[] = $can_edit ? array('data' => ' [' . _ed_classified_make_edit_link($ad, 'edit') .']') : '';

$rows[] = $fields;
}

example page: http://www.essexportal.co.uk/bamboo-garden-hammocks

I really need a solution to the simple problem, as my UK customers will be confused about some ads expiring before they are submitted!

Comments

Guillaume Beaulieu’s picture

This page answer it all: http://drupal.org/node/71106

inventlogic’s picture

You can place a line in settings.php to override the date format

$conf['classified-date-format'] = '%d %h %Y';

The format uses UNIX date formatting.