1
0
Fork 0

From now on we are using 0001-01-01 as lowest date

This commit is contained in:
Michael 2017-03-18 11:42:54 +00:00
commit 222550e784
4 changed files with 69 additions and 77 deletions

View file

@ -96,17 +96,10 @@ class dbm {
public static function date($date = 'now') {
$timestamp = strtotime($date);
// Workaround for 3.5.1
if ($timestamp < -62135596800) {
return NULL_DATE;
}
// The above will be removed in 3.5.2
// The following will then be enabled
// Don't allow lower date strings as '0001-01-01 00:00:00'
//if ($timestamp < -62135596800) {
// $timestamp = -62135596800;
//}
if ($timestamp < -62135596800) {
$timestamp = -62135596800;
}
return date('Y-m-d H:i:s', $timestamp);
}