Refactor datetime_convert into Temporal::convert
- Changed parameter order to save space - Refactor select_timezone into Temporal::getTimezoneSelect - Refactor field_timezone into Temporal::getTimezoneField
This commit is contained in:
parent
d478ef6c6d
commit
dc366bf1f7
62 changed files with 512 additions and 432 deletions
|
@ -2,9 +2,11 @@
|
|||
/**
|
||||
* @file mod/localtime.php
|
||||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Util\Temporal;
|
||||
|
||||
require_once 'include/datetime.php';
|
||||
|
||||
|
@ -18,7 +20,7 @@ function localtime_post(App $a)
|
|||
$bd_format = L10n::t('l F d, Y \@ g:i A') ; // Friday January 18, 2011 @ 8 AM
|
||||
|
||||
if ($_POST['timezone']) {
|
||||
$a->data['mod-localtime'] = datetime_convert('UTC', $_POST['timezone'], $t, $bd_format);
|
||||
$a->data['mod-localtime'] = Temporal::convert($t, $_POST['timezone'], 'UTC', $bd_format);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -50,7 +52,7 @@ function localtime_content(App $a)
|
|||
|
||||
$o .= '<p>' . L10n::t('Please select your timezone:') . '</p>';
|
||||
|
||||
$o .= select_timezone(($_REQUEST['timezone']) ? $_REQUEST['timezone'] : 'America/Los_Angeles');
|
||||
$o .= Temporal::getTimezoneSelect(($_REQUEST['timezone']) ? $_REQUEST['timezone'] : 'America/Los_Angeles');
|
||||
|
||||
$o .= '<input type="submit" name="submit" value="' . L10n::t('Submit') . '" /></form>';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue