mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-21 21:03:42 +00:00
Add Temporal::local() shorthand for Temporal::convert()
This commit is contained in:
parent
cbc89d147d
commit
13fb4a312d
2 changed files with 6 additions and 6 deletions
|
@ -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"];
|
||||
|
|
|
@ -26,8 +26,8 @@ function membersince_uninstall()
|
|||
function membersince_display(&$a, &$b)
|
||||
{
|
||||
// Works in Vier
|
||||
$b = preg_replace('/<\/dl>/', "</dl>\n\n\n<dl id=\"aprofile-membersince\" class=\"aprofile\">\n<dt>" . L10n::t('Member since:') . "</dt>\n<dd>" . Temporal::convert($a->profile['register_date'], date_default_timezone_get()) . "</dd>\n</dl>", $b, 1);
|
||||
$b = preg_replace('/<\/dl>/', "</dl>\n\n\n<dl id=\"aprofile-membersince\" class=\"aprofile\">\n<dt>" . L10n::t('Member since:') . "</dt>\n<dd>" . Temporal::local($a->profile['register_date']) . "</dd>\n</dl>", $b, 1);
|
||||
|
||||
// Trying for Frio
|
||||
//$b = preg_replace('/<\/div>/', "<div id=\"aprofile-membersince\" class=\"aprofile\"><hr class=\"profile-separator\"><div class=\"profile-label-name\">" . L10n::t('Member since:') . "</div><div class=\"profile-entry\">" . Temporal::convert($a->profile['register_date'], date_default_timezone_get()) . "</div></div>", $b, 1);
|
||||
//$b = preg_replace('/<\/div>/', "<div id=\"aprofile-membersince\" class=\"aprofile\"><hr class=\"profile-separator\"><div class=\"profile-label-name\">" . L10n::t('Member since:') . "</div><div class=\"profile-entry\">" . Temporal::local($a->profile['register_date']) . "</div></div>", $b, 1);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue