mirror of
https://github.com/friendica/friendica
synced 2025-04-25 03:50: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
|
@ -416,7 +416,7 @@ function drop_item($id) {
|
|||
|
||||
/* arrange the list in years */
|
||||
function list_post_dates($uid, $wall) {
|
||||
$dnow = Temporal::convert('now', date_default_timezone_get(), 'UTC', 'Y-m-d');
|
||||
$dnow = Temporal::timezoneNow(date_default_timezone_get(), '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::convert('now', date_default_timezone_get(), 'UTC', 'Y')) - $visible_years;
|
||||
$cutoff_year = intval(Temporal::timezoneNow(date_default_timezone_get(), 'Y')) - $visible_years;
|
||||
$cutoff = ((array_key_exists($cutoff_year, $ret))? true : false);
|
||||
|
||||
$o = replace_macros(get_markup_template('posted_date_widget.tpl'),[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue