You are here

private function ScheduledPublishCron::getTimestampFromIso8601 in Scheduled Publish 8

Same name and namespace in other branches
  1. 8.3 src/Service/ScheduledPublishCron.php \Drupal\scheduled_publish\Service\ScheduledPublishCron::getTimestampFromIso8601()
  2. 8.2 src/Service/ScheduledPublishCron.php \Drupal\scheduled_publish\Service\ScheduledPublishCron::getTimestampFromIso8601()
1 call to ScheduledPublishCron::getTimestampFromIso8601()
ScheduledPublishCron::updateNodeField in src/Service/ScheduledPublishCron.php

File

src/Service/ScheduledPublishCron.php, line 108

Class

ScheduledPublishCron
Class ScheduledPublishCron

Namespace

Drupal\scheduled_publish\Service

Code

private function getTimestampFromIso8601(string $dateIso8601) : int {
  $datetime = new DateTime($dateIso8601, new DateTimeZone(drupal_get_user_timezone()));
  return $datetime
    ->getTimestamp();
}