TimestampNormalizer::$allowedFormats

Same name in other branches
  1. 9 core/modules/serialization/src/Normalizer/TimestampNormalizer.php \Drupal\serialization\Normalizer\TimestampNormalizer::allowedFormats
  2. 8.9.x core/modules/serialization/src/Normalizer/TimestampNormalizer.php \Drupal\serialization\Normalizer\TimestampNormalizer::allowedFormats
  3. 10 core/modules/serialization/src/Normalizer/TimestampNormalizer.php \Drupal\serialization\Normalizer\TimestampNormalizer::allowedFormats

Type: allowedFormats

Overrides DateTimeNormalizer::$allowedFormats

File

core/modules/serialization/src/Normalizer/TimestampNormalizer.php, line 21

Class

TimestampNormalizer
Converts values for the Timestamp data type to and from common formats.

Namespace

Drupal\serialization\Normalizer

Code

protected $allowedFormats = [
    'UNIX timestamp' => 'U',
    'ISO 8601' => \DateTime::ISO8601,
    'RFC 3339' => \DateTime::RFC3339,
];

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.