Quote Originally Posted by DigiBooks View Post
I have come across this line in admin/includes/unctions/general.php:

return preg_replace('/2037$/', $year, date(DATE_FORMAT, mktime($hour, $minute, $second, $month, $day, 2037)));

which comes with the standard installation but I'm not sure why it's there or what it means!
Quote Originally Posted by mc12345678 View Post
Allows a date beyond the php cutoff... There were some in the last year that needed to be able to address dates greater than 21 years away. That will take the year 2037 out of the "string" and substitute the applicable date if you understand it correctly...
More specifically, somewhat working from the right first, create a date formatted as desired, but make it show the year 2037. Then the left part of the statement, replace 2037 with the part in the middle (the actual year that is being "displayed".) It has to do with bits and bytes etc... There are only so large of a number available. The time that is measured is like in milli seconds from some fixed point in "time". Once the largest number is met, it flips back around to the "beginning". So a little trickier is used. Get the parts of the date except the year, but force the year to be what is desired to be displayed by controlling the "solution". :)