Hi
At present the deadline on a job posting displays like a countdown. eg: Deadline: 1 week 23 hours 45 minutes.
What needs to be changed to get it to display like "Deadline: 15 Oct 2008"

Comments

gmarus’s picture

You'll need to replace the call to _job_posting_deadline_countdown() in the theme_job_posting_node_display function (job_posting.module). At this point the deadline is a unix timestamp in GMT so use the php built-in function date() to display whatever format you want.

So instead of this:

$deadline = _job_posting_deadline_countdown($node->job_posting_deadline);

You could do something like this:

$deadline = date('d M Y', $node->job_posting_deadline);

Remember that the date is in GMT so if you want local time you'll have to work this out yourself. Also check out http://php.net/manual/en/function.date.php for other format possibilities.

Andy Galaxy’s picture

Perfect! Thanks yet again.

gmarus’s picture

Status: Active » Closed (fixed)
webwriter’s picture

Version: 5.x-1.3 » 6.x-1.9

Is there a way to do this with the most current version of job posting for 6.x? It looks a bit more complex in this version...

millionaire’s picture

Just to let everyone know, I'm on version 6 x 1.11
and I've done this by changing the line in job-posting-node.tpl.php as follows;

print $deadline;

to;

print $deadline = date('d M Y', $node->job_posting_deadline);

It's around line 45 if that helps!