summaryrefslogtreecommitdiffstats
path: root/core/lib/Drupal/Core/TypedData/Plugin/DataType/Timestamp.php
diff options
context:
space:
mode:
authorNathaniel Catchpole2013-08-10 08:00:02 +0100
committerNathaniel Catchpole2013-08-10 08:00:02 +0100
commite2a81db3c6922f144cd0e583d887588077ddbf91 (patch)
tree71bff94ec0e856457cc50e934823bdcfe9906734 /core/lib/Drupal/Core/TypedData/Plugin/DataType/Timestamp.php
parent18a03b1f133d7d8f307789ead50ea6087f97851f (diff)
Issue #1844956 by msonnabaum, beejeebus: Fixed Optimize date formatting performance.
Diffstat (limited to 'core/lib/Drupal/Core/TypedData/Plugin/DataType/Timestamp.php')
-rw-r--r--core/lib/Drupal/Core/TypedData/Plugin/DataType/Timestamp.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Timestamp.php b/core/lib/Drupal/Core/TypedData/Plugin/DataType/Timestamp.php
index c0cad02..c817e25 100644
--- a/core/lib/Drupal/Core/TypedData/Plugin/DataType/Timestamp.php
+++ b/core/lib/Drupal/Core/TypedData/Plugin/DataType/Timestamp.php
@@ -34,7 +34,7 @@ class Timestamp extends Integer implements DateTimeInterface {
*/
public function getDateTime() {
if ($this->value) {
- return new DrupalDateTime($this->value);
+ return DrupalDateTime::createFromTimestamp($this->value);
}
}