Skip to content
Browse files

fixed previous commit

  • Loading branch information...
1 parent 1fca277 commit 9053d67523afb31e0077b7d981f5db34988949ad @craue committed Jan 27, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 Twig/Extension/FormatDateTimeExtension.php
View
4 Twig/Extension/FormatDateTimeExtension.php
@@ -149,8 +149,8 @@ protected function getFormattedDateTime($value, $locale, $datetype, $timetype) {
// IntlDateFormatter#format() doesn't support \DateTime objects prior to PHP 5.3.4 (http://php.net/manual/intldateformatter.format.php)
if ($valueToUse instanceof \DateTime) {
- // \DateTime::getTimestamp() would return false for year > 2038 on 32-bit systems
- $valueToUse = intval($valueToUse->format('U'));
+ // \DateTime::getTimestamp() would return false for year > 2038 on 32-bit systems (https://bugs.php.net/bug.php?id=50590)
+ $valueToUse = floatval($valueToUse->format('U'));
}
$localeToUse = !empty($locale) ? $locale : $this->getLocale();

0 comments on commit 9053d67

Please sign in to comment.
Something went wrong with that request. Please try again.