X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Flocaltime.php;h=9a754ac80d9edddc07892840ea897b31b9a43849;hb=f001a830ee4c76c0d1834f3744403078852226e7;hp=f5ecf3a961bb00b9fbb8b107e27d947099daebbd;hpb=2f5a34ad1791f01cacb3b86c11501f0e11c67df4;p=friendica.git diff --git a/mod/localtime.php b/mod/localtime.php index f5ecf3a961..9a754ac80d 100644 --- a/mod/localtime.php +++ b/mod/localtime.php @@ -1,44 +1,59 @@ data['mod-localtime'] = datetime_convert('UTC',$_POST['timezone'],$t,$bd_format); + $bd_format = L10n::t('l F d, Y \@ g:i A') ; // Friday January 18, 2011 @ 8 AM + if ($_POST['timezone']) { + $a->data['mod-localtime'] = DateTimeFormat::convert($t, $_POST['timezone'], 'UTC', $bd_format); + } } -function localtime_content(&$a) { +function localtime_content(App $a) +{ $t = $_REQUEST['time']; - if(! $t) + if (! $t) { $t = 'now'; + } - $o .= '
' . t('Friendika provides this service for sharing events with other networks and friends in unknown timezones.') . '
'; + $o .= '' . L10n::t('Friendica provides this service for sharing events with other networks and friends in unknown timezones.') . '
'; - if(x($a->data,'mod-localtime')) - $o .= '' . sprintf( t('Converted localtime: %s'),$a->data['mod-localtime']) . '
'; - $o .= '' . sprintf( t('UTC time: %s'), $t) . '
'; + $o .= '' . L10n::t('UTC time: %s', $t) . '
'; - $o .= ''; + $o .= ''; -} \ No newline at end of file + return $o; +}