I am not a developer, just a simple end user and I am using Dolibarr for managing my one man show consulting company.
Whenever I want to add a task to a specific project, I always receive the following massage:
Fatal error: Uncaught exception ‘Exception’ with message ‘DateTime::__construct() expects parameter 2 to be DateTimeZone, null given’ in C:\dolibarr\www\dolibarr\htdocs\core\lib\functions.lib.php:1057 Stack trace: #0 C:\dolibarr\www\dolibarr\htdocs\core\lib\functions.lib.php(1057): DateTime->__construct(’’, NULL) #1 C:\dolibarr\www\dolibarr\htdocs\projet\tasks.php(86): dol_mktime(‘15’, ‘48’, 0, ‘11’, ‘06’, ‘2014’, ‘user’) #2 {main} thrown in C:\dolibarr\www\dolibarr\htdocs\core\lib\functions.lib.php on line 1057
I have no idea how to solve this, unless somebody volunteers for this task, by sending me a manual, if exist, or also is willing to work this through a shared desktop.
the problem is corrected by adding the below linge:
$localtz = new DateTimeZone($default_timezone);
in the folder: htdocs/core/lib/functions.lib.php ligne 1050
catch(Exception $e)
{
dol_syslog("Warning dol_tz_string contains an invalid value ".$_SESSION[“dol_tz_string”], LOG_WARNING);
$default_timezone=@date_default_timezone_get();
$localtz = new DateTimeZone($default_timezone);
}