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,16 +553,16 @@ 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);
|
||||
$shadowLastChange = $time->format('d. m. Y');
|
||||
$shadowLastChange = $time->format('d.m.Y');
|
||||
}
|
||||
$shadowExpire = '';
|
||||
if (!empty($this->attributes['shadowExpire'][0])) {
|
||||
$time = new DateTime('@' . $this->attributes['shadowExpire'][0]*24*3600);
|
||||
$shadowExpire = $time->format('d. m. Y');
|
||||
$shadowExpire = $time->format('d.m.Y');
|
||||
}
|
||||
$return = array();
|
||||
$this->addPDFKeyValue($return, 'shadowLastChange', _('Last password change'), $shadowLastChange);
|
||||
|
|
|
@ -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