From bb20b4f419a94ad913f6f565acbe10c58a7174a8 Mon Sep 17 00:00:00 2001 From: bancer Date: Thu, 31 Jan 2019 09:49:41 +0100 Subject: [PATCH] Change private method to protected --- lib/Cake/Utility/CakeTime.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/Cake/Utility/CakeTime.php b/lib/Cake/Utility/CakeTime.php index f1c7ee158..63911bfde 100644 --- a/lib/Cake/Utility/CakeTime.php +++ b/lib/Cake/Utility/CakeTime.php @@ -369,7 +369,7 @@ class CakeTime { $format = static::$niceFormat; } $convertedFormat = static::convertSpecifiers($format, $timestamp); - return static::__strftimeWithTimezone($convertedFormat, $timestamp, $date, $timezone); + return static::_strftimeWithTimezone($convertedFormat, $timestamp, $date, $timezone); } /** @@ -394,19 +394,19 @@ class CakeTime { $timestamp = static::fromString($date, $timezone); if (static::isToday($date, $timezone)) { - $formattedDate = static::__strftimeWithTimezone("%H:%M", $timestamp, $date, $timezone); + $formattedDate = static::_strftimeWithTimezone("%H:%M", $timestamp, $date, $timezone); return __d('cake', 'Today, %s', $formattedDate); } if (static::wasYesterday($date, $timezone)) { - $formattedDate = static::__strftimeWithTimezone("%H:%M", $timestamp, $date, $timezone); + $formattedDate = static::_strftimeWithTimezone("%H:%M", $timestamp, $date, $timezone); return __d('cake', 'Yesterday, %s', $formattedDate); } if (static::isTomorrow($date, $timezone)) { - $formattedDate = static::__strftimeWithTimezone("%H:%M", $timestamp, $date, $timezone); + $formattedDate = static::_strftimeWithTimezone("%H:%M", $timestamp, $date, $timezone); return __d('cake', 'Tomorrow, %s', $formattedDate); } - $d = static::__strftimeWithTimezone("%w", $timestamp, $date, $timezone); + $d = static::_strftimeWithTimezone("%w", $timestamp, $date, $timezone); $day = array( __d('cake', 'Sunday'), __d('cake', 'Monday'), @@ -417,11 +417,11 @@ class CakeTime { __d('cake', 'Saturday') ); if (static::wasWithinLast('7 days', $date, $timezone)) { - $formattedDate = static::__strftimeWithTimezone(static::$niceShortFormat, $timestamp, $date, $timezone); + $formattedDate = static::_strftimeWithTimezone(static::$niceShortFormat, $timestamp, $date, $timezone); return sprintf('%s %s', $day[$d], $formattedDate); } if (static::isWithinNext('7 days', $date, $timezone)) { - $formattedDate = static::__strftimeWithTimezone(static::$niceShortFormat, $timestamp, $date, $timezone); + $formattedDate = static::_strftimeWithTimezone(static::$niceShortFormat, $timestamp, $date, $timezone); return __d('cake', 'On %s %s', $day[$d], $formattedDate); } @@ -430,7 +430,7 @@ class CakeTime { $y = ' %Y'; } $format = static::convertSpecifiers("%b %eS{$y}, %H:%M", $timestamp); - return static::__strftimeWithTimezone($format, $timestamp, $date, $timezone); + return static::_strftimeWithTimezone($format, $timestamp, $date, $timezone); } /** @@ -1072,7 +1072,7 @@ class CakeTime { $format = '%x'; } $convertedFormat = static::convertSpecifiers($format, $timestamp); - return static::__strftimeWithTimezone($convertedFormat, $timestamp, $date, $timezone); + return static::_strftimeWithTimezone($convertedFormat, $timestamp, $date, $timezone); } /** @@ -1193,7 +1193,7 @@ class CakeTime { * @param string|DateTimeZone $timezone Timezone string or DateTimeZone object. * @return string Formatted date string with correct encoding. */ - private static function __strftimeWithTimezone($format, $timestamp, $date, $timezone) { + protected static function _strftimeWithTimezone($format, $timestamp, $date, $timezone) { $serverTimeZone = date_default_timezone_get(); if ( !empty($timezone) &&