use Friendica\Core\Config;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
+use Friendica\Util\Temporal;
use dba;
require_once 'include/dba.php';
// once daily run birthday_updates and then expire in background
$d1 = Config::get('system', 'last_expire_day');
- $d2 = intval(datetime_convert('UTC', 'UTC', 'now', 'd'));
+ $d2 = intval(Temporal::convert('now', 'UTC', 'UTC', 'd'));
if ($d2 != intval($d1)) {
Addon::reload();
- $d = datetime_convert();
+ $d = Temporal::convert();
// Only poll from those with suitable relationships,
// and which have a polling address and ignore Diaspora since
*/
switch ($contact['priority']) {
case 5:
- if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 month")) {
+ if (Temporal::convert('now') > Temporal::convert($t . " + 1 month")) {
$update = true;
}
break;
case 4:
- if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 week")) {
+ if (Temporal::convert('now') > Temporal::convert($t . " + 1 week")) {
$update = true;
}
break;
case 3:
- if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 day")) {
+ if (Temporal::convert('now') > Temporal::convert($t . " + 1 day")) {
$update = true;
}
break;
case 2:
- if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 12 hour")) {
+ if (Temporal::convert('now') > Temporal::convert($t . " + 12 hour")) {
$update = true;
}
break;
case 1:
- if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + 1 hour")) {
+ if (Temporal::convert('now') > Temporal::convert($t . " + 1 hour")) {
$update = true;
}
break;
case 0:
default:
- if (datetime_convert('UTC', 'UTC', 'now') > datetime_convert('UTC', 'UTC', $t . " + ".$min_poll_interval." minute")) {
+ if (Temporal::convert('now') > Temporal::convert($t . " + ".$min_poll_interval." minute")) {
$update = true;
}
break;