X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Flib%2FDrupal%2FCore%2FDatetime%2FDrupalDateTime.php;h=f921b45b464ff58b8c1d0bec3094e2b43730814a;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=572a6e3c6620910781b18fcbf02423d0e05ed2df;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/lib/Drupal/Core/Datetime/DrupalDateTime.php b/web/core/lib/Drupal/Core/Datetime/DrupalDateTime.php index 572a6e3c6..f921b45b4 100644 --- a/web/core/lib/Drupal/Core/Datetime/DrupalDateTime.php +++ b/web/core/lib/Drupal/Core/Datetime/DrupalDateTime.php @@ -34,7 +34,11 @@ class DrupalDateTime extends DateTimePlus { * A date/input_time_adjusted string. Defaults to 'now'. * @param mixed $timezone * PHP DateTimeZone object, string or NULL allowed. - * Defaults to NULL. + * Defaults to NULL. Note that the $timezone parameter and the current + * timezone are ignored when the $time parameter either is a UNIX timestamp + * (e.g. @946684800) or specifies a timezone + * (e.g. 2010-01-28T15:00:00+02:00). + * @see http://php.net/manual/datetime.construct.php * @param array $settings * - validate_format: (optional) Boolean choice to validate the * created date using the input format. The format used in @@ -104,7 +108,7 @@ class DrupalDateTime extends DateTimePlus { $format = parent::format($format, $settings); // Translates a formatted date string. - $translation_callback = function($matches) use ($langcode) { + $translation_callback = function ($matches) use ($langcode) { $code = $matches[1]; $string = $matches[2]; if (!isset($this->formatTranslationCache[$langcode][$code][$string])) {