use getTimeZone()
This commit is contained in:
parent
da7e667100
commit
96ae5f85e2
|
@ -1283,8 +1283,7 @@ function getCallingURL() {
|
|||
* @return int offset
|
||||
*/
|
||||
function getTimeZoneOffsetHours() {
|
||||
$timeZone = $_SESSION['config']->getTimeZone();
|
||||
$dtz = new DateTimeZone($timeZone);
|
||||
$dtz = getTimeZone();
|
||||
return round($dtz->getOffset(new DateTime('UTC')) / 3600);
|
||||
}
|
||||
|
||||
|
|
|
@ -553,7 +553,7 @@ class shadowAccount extends baseModule implements passwordService {
|
|||
* @return list of PDF entries (array(<PDF key> => <PDF lines>))
|
||||
*/
|
||||
function get_pdfEntries($pdfKeys) {
|
||||
$timeZone = new DateTimeZone($_SESSION['config']->getTimeZone());
|
||||
$timeZone = getTimeZone();
|
||||
$shadowLastChange = '';
|
||||
if (!empty($this->attributes['shadowLastChange'][0])) {
|
||||
$time = new DateTime('@' . $this->attributes['shadowLastChange'][0]*24*3600, $timeZone);
|
||||
|
|
|
@ -647,7 +647,7 @@ class lamUserList extends lamList {
|
|||
// expire dates
|
||||
elseif ($attribute == 'shadowexpire') {
|
||||
if (!empty($entry[$attribute][0])) {
|
||||
$time = new DateTime('@' . $entry[$attribute][0] * 24 * 3600, new DateTimeZone($_SESSION['config']->getTimeZone()));
|
||||
$time = new DateTime('@' . $entry[$attribute][0] * 24 * 3600, getTimeZone());
|
||||
echo $time->format('d.m.Y');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue