mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 00:48:55 +00:00
Refactor datetime_convert() into Temporal::convert()
This commit is contained in:
parent
0e987b5c4c
commit
b24690e8df
11 changed files with 66 additions and 46 deletions
|
@ -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'])
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue