mirror of
https://github.com/friendica/friendica
synced 2025-04-27 18:30:12 +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
|
@ -659,7 +659,7 @@ class Profile
|
|||
}
|
||||
|
||||
$strt = Temporal::convert($rr['start'], $rr['convert'] ? $a->timezone : 'UTC', 'UTC', 'Y-m-d');
|
||||
if ($strt === Temporal::convert('now', $a->timezone, 'UTC', 'Y-m-d')) {
|
||||
if ($strt === Temporal::timezoneNow($a->timezone, 'Y-m-d')) {
|
||||
$istoday = true;
|
||||
}
|
||||
|
||||
|
@ -676,11 +676,11 @@ class Profile
|
|||
|
||||
$strt = Temporal::convert($rr['start'], $rr['convert'] ? $a->timezone : 'UTC');
|
||||
|
||||
if (substr($strt, 0, 10) < Temporal::convert('now', $a->timezone, 'UTC', 'Y-m-d')) {
|
||||
if (substr($strt, 0, 10) < Temporal::timezoneNow($a->timezone, 'Y-m-d')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$today = ((substr($strt, 0, 10) === Temporal::convert('now', $a->timezone, 'UTC', 'Y-m-d')) ? true : false);
|
||||
$today = ((substr($strt, 0, 10) === Temporal::timezoneNow($a->timezone, 'Y-m-d')) ? true : false);
|
||||
|
||||
$rr['title'] = $title;
|
||||
$rr['description'] = $description;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue