Member:
Markus ⋅
Date: February 24, 2010, 12:58 PM
⋅ Subject: "Re: International sites."
What's going on is called "relative date" in the systems, and it's happening in class_global.php under make_date() across all versions of our software. Find this line:
if ($limit > 0 && $difference < ($limit * 86400))
{ // Make relative date
If you want to short-circuit this, you can just add $limit = 0; above this line. (As I have done at Wiccle.com while typing this, and expect to see this post have an absolute time as I hit Publish.) I will bring this under the Admin CP time controls in the next minor update, and have added this as a feature request.
If you want to for some reason control this on a case by case basis, you can look for calls to make_date() in the preprocessors under class_modules.php. You will find entries like this:
$data['post_date_relative'] = Utility::make_date($core['module']['format_post_date'], $data['post_date'], 30);
The last variable there (30) is the value going into $limit in the function. Change that to zero wherever you want to stop using relative times. The parsing done under post_preprocessor() function applies for all post-level data, and so forth. If you want more control over date display, you can look up $core['module']['format_post_date'] in /core/config_mapper.php --- currently set to "date_long" which corresponds to the long date format you can edit in the Admin CP > System > Date & Time. (And this is used for threads and other content as well by default.)
(You can also start creating your own data preprocessor extensions if you're interested -- just let me know, it's easy enough.)
The $limit variable and the value there will also be used for deciding whether to use a long or a short timestamp after $limit number of days (like 30), but this appears to be currently commented out for some reason. I'll resurrect these controls in the next update too, they are already there, and I guess (from the comments in that file) I was too much in a rush and just snipped them out when I was trying to fix some other date-related quirk.
It looks like the "Time cutoff" field in the Admin CP time options (available under $core['init']['no_time_after_days']) is actually meant to replace this hard-coded value in the preprocessors, but just hasn't been put into use yet. (There are the few odd idle switches still in the Admin CP.)