<?php
+use Friendica\App;
+use Friendica\Core\System;
+
require_once('include/datetime.php');
-if(! function_exists('localtime_post')) {
-function localtime_post(&$a) {
+function localtime_post(App $a) {
$t = $_REQUEST['time'];
if(! $t)
if($_POST['timezone'])
$a->data['mod-localtime'] = datetime_convert('UTC',$_POST['timezone'],$t,$bd_format);
-}
+
}
-if(! function_exists('localtime_content')) {
-function localtime_content(&$a) {
+function localtime_content(App $a) {
$t = $_REQUEST['time'];
if(! $t)
$t = 'now';
$o .= '<p>' . sprintf( t('Converted localtime: %s'),$a->data['mod-localtime']) . '</p>';
- $o .= '<form action ="' . $a->get_baseurl() . '/localtime?f=&time=' . $t . '" method="post" >';
+ $o .= '<form action ="' . System::baseUrl() . '/localtime?f=&time=' . $t . '" method="post" >';
$o .= '<p>' . t('Please select your timezone:') . '</p>';
$o .= '<input type="submit" name="submit" value="' . t('Submit') . '" /></form>';
return $o;
-}
+
}