function TimestampNormalizer::getNormalizationTimezone

Same name in other branches
  1. 9 core/modules/serialization/src/Normalizer/TimestampNormalizer.php \Drupal\serialization\Normalizer\TimestampNormalizer::getNormalizationTimezone()
  2. 10 core/modules/serialization/src/Normalizer/TimestampNormalizer.php \Drupal\serialization\Normalizer\TimestampNormalizer::getNormalizationTimezone()
  3. 11.x core/modules/serialization/src/Normalizer/TimestampNormalizer.php \Drupal\serialization\Normalizer\TimestampNormalizer::getNormalizationTimezone()

Overrides DateTimeNormalizer::getNormalizationTimezone

File

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

Class

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

Namespace

Drupal\serialization\Normalizer

Code

protected function getNormalizationTimezone() {
    return new \DateTimeZone('UTC');
}

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