You are here

public static function TimestampHelper::stringToTimestampOld in Node expire 7.2

Converts string to timestamp.

File

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

Class

TimestampHelper
TimestampHelper class.

Namespace

Drupal\node_expire\Module\CommonExpire\Conversion

Code

public static function stringToTimestampOld($format, $str) {
  $dt = \DateTime::createFromFormat('!' . $format, $str);
  $timestamp = $dt
    ->getTimestamp();
  return $timestamp;
}