For integers the default is to treat them as a unix timestamp. If a format to cerate from is given, this will be used instead. If source is a string it is expected to be formatted according to DEFAULT_DATE_FORMAT. This default date format can be overridden in the initialize*Action() method like this:: $this->arguments[''] ->getPropertyMappingConfiguration() ->forProperty('') // this line can be skipped in order to specify the format for all properties ->setTypeConverterOption(\Neos\Flow\Property\TypeConverter\DateTimeConverter::class, \Neos\Flow\Property\TypeConverter\DateTimeConverter::CONFIGURATION_DATE_FORMAT, ''); If the source is of type array, it is possible to override the format in the source:: array( 'date' => '', 'dateFormat' => '' ); By using an array as source you can also override time and timezone of the created DateTime object:: array( 'date' => '', 'hour' => '', // integer 'minute' => '', // integer 'seconds' => '', // integer 'timezone' => '', // string, see http://www.php.net/manual/timezones.php ); As an alternative to providing the date as string, you might supply day, month and year as array items each:: array( 'day' => '', // integer 'month' => '', // integer 'year' => '', // integer );
Inheritance: extends AbstractTypeConverter
    /**
     * @test
     */
    public function convertFromSupportsDateTimeSubClasses()
    {
        $className = 'DateTimeSubClass' . md5(uniqid(mt_rand(), true));
        if (version_compare(PHP_VERSION, '7.0.0-dev')) {
            eval('
			class ' . $className . ' extends \\DateTime {
				public static function createFromFormat($format, $time, $timezone = NULL) {
					return new ' . $className . '();
				}
				public function foo() { return "Bar"; }
			}
		');
        } else {
            eval('
				class ' . $className . ' extends \\DateTime {
					public static function createFromFormat($format, $time, \\DateTimeZone $timezone = NULL) {
						return new ' . $className . '();
					}
					public function foo() { return "Bar"; }
				}
			');
        }
        $date = $this->converter->convertFrom('2005-08-15T15:52:01+00:00', $className);
        $this->assertInstanceOf($className, $date);
        $this->assertSame('Bar', $date->foo());
    }