protected function TimestampNormalizer::getNormalizationTimezone in Drupal 9
Same name and namespace in other branches
- 8 core/modules/serialization/src/Normalizer/TimestampNormalizer.php \Drupal\serialization\Normalizer\TimestampNormalizer::getNormalizationTimezone()
Gets the timezone to be used during normalization.
@returns \DateTimeZone The timezone to use.
Overrides DateTimeNormalizer::getNormalizationTimezone
See also
::normalize
\Drupal\Core\Datetime\DrupalDateTime::prepareTimezone()
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\NormalizerCode
protected function getNormalizationTimezone() {
return new \DateTimeZone('UTC');
}