Results
31.10.2019
replication 8.x-1.x-dev ::
tests/src/Kernel/Normalizer/NormalizerTestBase.php
94 95 96 97 98 99 100 101 102 | * The formatted RFC3339 date string or UNIX timestamp. * * @see \Drupal\serialization\Normalizer\TimestampItemNormalizer */ protected function formatExpectedTimestampItemValues( $timestamp ) { // Get the minor version only from the \Drupal::VERSION string. $minor_version = substr (\Drupal::VERSION, 0, 3); // If the setting is enabled, just return the timestamp as-is now. |
107 108 109 110 111 112 113 114 | // Otherwise, format the date string to the same that // \Drupal\serialization\Normalizer\TimestampItemNormalizer will produce. $date = new \DateTime(); $date ->setTimestamp( $timestamp ); $date ->setTimezone( new \DateTimeZone( 'UTC' )); // Format is also added to the expected return values. return [ |
11.05.2020
content_sync 8.x-2.x-dev ::
src/Normalizer/TimestampItemNormalizer.php
6 7 8 9 10 11 12 13 14 | use Drupal\Core\TypedData\Plugin\DataType\Timestamp; use Drupal\serialization\Normalizer\TimestampItemNormalizer as BaseTimestampItemNormalizer; /** * Converts values for TimestampItem to and from common formats. * * Overrides FieldItemNormalizer and * \Drupal\serialization\Normalizer\TimestampNormalizer |
19.10.2020
smart_date 3.1.0-beta1 ::
src/Normalizer/SmartDateItemNormalizer.php
3 4 5 6 7 8 9 10 11 | namespace Drupal\smart_date\Normalizer; use Drupal\serialization\Normalizer\TimestampItemNormalizer; use Drupal\smart_date\Plugin\Field\FieldType\SmartDateItem; use Drupal\smart_date\TypedData\Plugin\DataType\SmartDate; /** * Converts values for TimestampItem to and from common formats. * |