|
|
@@ -67,7 +67,7 @@ class FrozenTime extends Chronos implements JsonSerializable
|
|
|
* The format to use when formatting a time using `Cake\I18n\FrozenTime::timeAgoInWords()`
|
|
|
* and the difference is more than `Cake\I18n\FrozenTime::$wordEnd`
|
|
|
*
|
|
|
- * @var string
|
|
|
+ * @var string|array|int
|
|
|
* @see \Cake\I18n\FrozenTime::timeAgoInWords()
|
|
|
*/
|
|
|
public static $wordFormat = [IntlDateFormatter::SHORT, -1];
|
|
|
@@ -110,7 +110,7 @@ class FrozenTime extends Chronos implements JsonSerializable
|
|
|
public function __construct($time = null, $tz = null)
|
|
|
{
|
|
|
if ($time instanceof DateTimeInterface) {
|
|
|
- $tz = $time->getTimeZone();
|
|
|
+ $tz = $time->getTimezone();
|
|
|
$time = $time->format('Y-m-d H:i:s');
|
|
|
}
|
|
|
|