From 13fb4a312dab2fefb8dd484b3492036391e80cb0 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 26 Jan 2018 19:33:46 -0500 Subject: [PATCH] Add Temporal::local() shorthand for Temporal::convert() --- .../dav_caldav_backend_virtual_friendica.inc.php | 8 ++++---- membersince/membersince.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dav/friendica/dav_caldav_backend_virtual_friendica.inc.php b/dav/friendica/dav_caldav_backend_virtual_friendica.inc.php index 3baaa10c..092dbbd8 100644 --- a/dav/friendica/dav_caldav_backend_virtual_friendica.inc.php +++ b/dav/friendica/dav_caldav_backend_virtual_friendica.inc.php @@ -68,8 +68,8 @@ class Sabre_CalDAV_Backend_Friendica extends Sabre_CalDAV_Backend_Virtual $component = dav_get_eventComponent($vevent); if ($row["adjust"]) { - $start = Temporal::convert($row["start"], date_default_timezone_get()); - $finish = Temporal::convert($row["finish"], date_default_timezone_get()); + $start = Temporal::local($row["start"]); + $finish = Temporal::local($row["finish"]); } else { $start = $row["start"]; $finish = $row["finish"]; @@ -116,8 +116,8 @@ class Sabre_CalDAV_Backend_Friendica extends Sabre_CalDAV_Backend_Virtual private function jqcal2wdcal($row, $calendar, $base_path) { if ($row["adjust"]) { - $start = Temporal::convert($row["start"], date_default_timezone_get()); - $finish = Temporal::convert($row["finish"], date_default_timezone_get()); + $start = Temporal::local($row["start"]); + $finish = Temporal::local($row["finish"]); } else { $start = $row["start"]; $finish = $row["finish"]; diff --git a/membersince/membersince.php b/membersince/membersince.php index b8bbca49..fb923bde 100644 --- a/membersince/membersince.php +++ b/membersince/membersince.php @@ -26,8 +26,8 @@ function membersince_uninstall() function membersince_display(&$a, &$b) { // Works in Vier - $b = preg_replace('/<\/dl>/', "\n\n\n
\n
" . L10n::t('Member since:') . "
\n
" . Temporal::convert($a->profile['register_date'], date_default_timezone_get()) . "
\n
", $b, 1); + $b = preg_replace('/<\/dl>/', "\n\n\n
\n
" . L10n::t('Member since:') . "
\n
" . Temporal::local($a->profile['register_date']) . "
\n
", $b, 1); // Trying for Frio - //$b = preg_replace('/<\/div>/', "

" . L10n::t('Member since:') . "
" . Temporal::convert($a->profile['register_date'], date_default_timezone_get()) . "
", $b, 1); + //$b = preg_replace('/<\/div>/', "

" . L10n::t('Member since:') . "
" . Temporal::local($a->profile['register_date']) . "
", $b, 1); } -- 2.39.5