]> git.mxchange.org Git - friendica.git/blobdiff - include/items.php
Add Temporal::localNow() shorthand for Temporal::convert()
[friendica.git] / include / items.php
index b5ec592e009bddfecd3ad74554f2a14ff78d600e..e5a04b120074cf3b8e5a2691921013bd4215aff8 100644 (file)
@@ -416,7 +416,7 @@ function drop_item($id) {
 
 /* arrange the list in years */
 function list_post_dates($uid, $wall) {
-       $dnow = Temporal::timezoneNow(date_default_timezone_get(), 'Y-m-d');
+       $dnow = Temporal::localNow('Y-m-d');
 
        $dthen = Item::firstPostDate($uid, $wall);
        if (!$dthen) {
@@ -474,7 +474,7 @@ function posted_date_widget($url, $uid, $wall) {
                return $o;
        }
 
-       $cutoff_year = intval(Temporal::timezoneNow(date_default_timezone_get(), 'Y')) - $visible_years;
+       $cutoff_year = intval(Temporal::localNow('Y')) - $visible_years;
        $cutoff = ((array_key_exists($cutoff_year, $ret))? true : false);
 
        $o = replace_macros(get_markup_template('posted_date_widget.tpl'),[