]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Profile.php
Add Temporal::timezoneNow() shorthand for Temporal::convert()
[friendica.git] / src / Model / Profile.php
index 1cbe5b9b81bd064df6d12d01b7004dca275e4759..aeb7155f1930a1905c3592bb870606f33f77fb1b 100644 (file)
@@ -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;