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