You are here

private static function Time::baseDateTime in Time Field For Drupal 8.x / 9.x 8

Same name and namespace in other branches
  1. 2.x src/Time.php \Drupal\time_field\Time::baseDateTime()

Base datetime object time functions on it.

Return value

\DateTime Base datetime object to use time on it

3 calls to Time::baseDateTime()
Time::createFromTimestamp in src/Time.php
Creates Time object from timestamp.
Time::format in src/Time.php
Format Time.
Time::formatForWidget in src/Time.php
Format for widget.

File

src/Time.php, line 74

Class

Time
Time class represents time of day.

Namespace

Drupal\time_field

Code

private static function baseDateTime() {
  return new \DateTime('2012-01-01 00:00:00');
}