mirror of
https://github.com/friendica/friendica
synced 2025-04-24 01:10:11 +00:00
Remove most calls to date_default_timezone_* calls
- It was wrongly used to set the node-wide ot user-specific timezone - It is now fully managed from the App object - Add a static variable to DateTimeFormat maintain the convenient local() method
This commit is contained in:
parent
08c24fd4fa
commit
6db211568a
11 changed files with 35 additions and 36 deletions
|
@ -372,10 +372,10 @@ class Network extends BaseModule
|
|||
}
|
||||
|
||||
if (self::$dateFrom) {
|
||||
$conditionStrings = DBA::mergeConditions($conditionStrings, ["`received` <= ? ", DateTimeFormat::convert(self::$dateFrom, 'UTC', date_default_timezone_get())]);
|
||||
$conditionStrings = DBA::mergeConditions($conditionStrings, ["`received` <= ? ", DateTimeFormat::convert(self::$dateFrom, 'UTC', DI::app()->getTimeZone())]);
|
||||
}
|
||||
if (self::$dateTo) {
|
||||
$conditionStrings = DBA::mergeConditions($conditionStrings, ["`received` >= ? ", DateTimeFormat::convert(self::$dateTo, 'UTC', date_default_timezone_get())]);
|
||||
$conditionStrings = DBA::mergeConditions($conditionStrings, ["`received` >= ? ", DateTimeFormat::convert(self::$dateTo, 'UTC', DI::app()->getTimeZone())]);
|
||||
}
|
||||
|
||||
if (self::$groupId) {
|
||||
|
|
|
@ -151,10 +151,10 @@ class Status extends BaseProfile
|
|||
}
|
||||
|
||||
if (!empty($datequery)) {
|
||||
$condition = DBA::mergeConditions($condition, ["`received` <= ?", DateTimeFormat::convert($datequery, 'UTC', date_default_timezone_get())]);
|
||||
$condition = DBA::mergeConditions($condition, ["`received` <= ?", DateTimeFormat::convert($datequery, 'UTC', $a->getTimeZone())]);
|
||||
}
|
||||
if (!empty($datequery2)) {
|
||||
$condition = DBA::mergeConditions($condition, ["`received` >= ?", DateTimeFormat::convert($datequery2, 'UTC', date_default_timezone_get())]);
|
||||
$condition = DBA::mergeConditions($condition, ["`received` >= ?", DateTimeFormat::convert($datequery2, 'UTC', $a->getTimeZone())]);
|
||||
}
|
||||
|
||||
// Does the profile page belong to a forum?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue