Closed (fixed)
Project:
Job Posting
Version:
6.x-1.9
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 Oct 2008 at 04:25 UTC
Updated:
12 Apr 2012 at 15:39 UTC
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
Comment #1
gmarus commentedYou'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.
Comment #2
Andy Galaxy commentedPerfect! Thanks yet again.
Comment #3
gmarus commentedComment #4
webwriter commentedIs 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...
Comment #5
millionaire commentedJust 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!