Created
June 3, 2013 16:22
-
-
Save waldoj/5699321 to your computer and use it in GitHub Desktop.
Actual code segment from ExpressionEngine, found within /expressionengine/expressionengine/libraries/Localize.php, in convert_human_date_to_gmt(). I tracked it down in an effort to fix the software's inability to store dates from prior to 1902 <http://ellislab.com/forums/viewthread/74033>, which they had blamed on everybody but themselves.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ($year < 1902 OR $year > 2037) | |
{ | |
return $this->EE->lang->line('date_outside_of_range'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think that's pretty easily addressed by PHP's
PHP_INT_SIZE
constant, which exists for just this purpose:That way, only folks on 32-bit environments are bound to the range, while the rest of us can have proper dates.