code: protected function checkTimestamp($val)
      {
          $secs = 86400 * 90; // 90 days worth o seconds
          $tsNow = \time();
          if ($val > $tsNow - $secs && $val < $tsNow + $secs) {
              return \date('Y-m-d H:i:s', $val);
          }
          return false;
      }
docs: Is value a timestamp?
  
  @param mixed $val value to check
  
  @return string|false