You are here

public static function TimestampHelper::timestampToDateTime in Node expire 7.2

Converts timestamp to DateTime.

File

src/Module/CommonExpire/Conversion/TimestampHelper.php, line 56
TimestampHelper class.

Class

TimestampHelper
TimestampHelper class.

Namespace

Drupal\node_expire\Module\CommonExpire\Conversion

Code

public static function timestampToDateTime($timestamp) {
  $dt = new \DateTime();
  $dt
    ->setTimestamp($timestamp);
  return $dt;
}