Ejemplo n.º 1
0
 /**
  * Checks whether a given date string is older than the given seconds
  *
  * @param $time expects date format YYYY-MM-DD HH:MM:SS
  * @param $seconds
  * @return bool
  */
 public static function isOlderThanSeconds($time, $seconds)
 {
     $dt = new DateTime($time, new DateTimeZone('UTC'));
     $offset = IfwPsn_Wp_Proxy_Blog::getGmtOffset();
     if (empty($offset)) {
         $offset = 0;
     }
     $timeTs = (int) $dt->format('U');
     return $timeTs + $seconds < time();
 }