mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 09:02:59 +01:00
Fix for tzuser
This commit is contained in:
@@ -2289,9 +2289,9 @@ function dol_print_date($time, $format = '', $tzoutput = 'auto', $outputlangs =
|
||||
$user_date_tz = new DateTimeZone($offsettzstring);
|
||||
$user_dt = new DateTime();
|
||||
$user_dt->setTimezone($user_date_tz);
|
||||
$user_dt->setTimestamp($time);
|
||||
$user_dt->setTimestamp($tzoutput == 'tzuser' ? dol_now() : $time);
|
||||
$offsettz = $user_dt->getOffset();
|
||||
} else {
|
||||
} else { // old method (The 'tzuser' was processed like the 'tzuserrel')
|
||||
$offsettz = (empty($_SESSION['dol_tz']) ? 0 : $_SESSION['dol_tz']) * 60 * 60; // Will not be used anymore
|
||||
$offsetdst = (empty($_SESSION['dol_dst']) ? 0 : $_SESSION['dol_dst']) * 60 * 60; // Will not be used anymore
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user