Refactor datetime_convert() into Temporal::convert()

This commit is contained in:
Hypolite Petovan 2018-01-24 21:29:09 -05:00
parent 0e987b5c4c
commit b24690e8df
11 changed files with 66 additions and 46 deletions

View file

@ -5,10 +5,12 @@
* Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
*/
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Model\User;
use Friendica\Util\Temporal;
function testdrive_install() {
@ -42,7 +44,7 @@ function testdrive_register_account($a,$b) {
return;
$r = q("UPDATE user set account_expires_on = '%s' where uid = %d",
dbesc(datetime_convert('UTC','UTC','now +' . $days . ' days')),
dbesc(Temporal::convert('now +' . $days . ' days')),
intval($uid)
);
@ -70,7 +72,7 @@ function testdrive_cron($a,$b) {
]);
q("update user set expire_notification_sent = '%s' where uid = %d",
dbesc(datetime_convert()),
dbesc(Temporal::convert()),
intval($rr['uid'])
);