mirror of
https://github.com/friendica/friendica
synced 2025-04-27 11:50:11 +00:00
Add Temporal::timezoneNow() shorthand for Temporal::convert()
This commit is contained in:
parent
35d06bd9eb
commit
89602e44da
8 changed files with 31 additions and 20 deletions
4
boot.php
4
boot.php
|
@ -1142,10 +1142,10 @@ function feed_birthday($uid, $tz)
|
|||
if (DBM::is_result($p)) {
|
||||
$tmp_dob = substr($p[0]['dob'], 5);
|
||||
if (intval($tmp_dob)) {
|
||||
$y = Temporal::convert('now', $tz, $tz, 'Y');
|
||||
$y = Temporal::timezoneNow($tz, 'Y');
|
||||
$bd = $y . '-' . $tmp_dob . ' 00:00';
|
||||
$t_dob = strtotime($bd);
|
||||
$now = strtotime(Temporal::convert('now', $tz, $tz));
|
||||
$now = strtotime(Temporal::timezoneNow($tz));
|
||||
if ($t_dob < $now) {
|
||||
$bd = $y + 1 . '-' . $tmp_dob . ' 00:00';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue