New: Function dol_now('tzuser') is now supported.

This commit is contained in:
Laurent Destailleur
2010-12-08 11:45:47 +00:00
parent 21d35ccda8
commit 0d4aa481cd
6 changed files with 64 additions and 30 deletions

View File

@@ -119,7 +119,8 @@ function dol_now($mode='tzserver')
else if ($mode == 'tzuser') // Time for now where the user is located
{
// TODO Should use the timezone of the user instead of timezone of server
$ret=mktime();
$tz=isset($_SESSION['dol_tz'])?$_SESSION['dol_tz']:0;
$ret=gmmktime()+($tz*24*60*60);
}
return $ret;
}