diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 4457e6279764cdfe936d72c052901b5655ce3364..7fba7f50247039f7750742de9e5c7455c2fad729 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -446,7 +446,7 @@ if (! defined('NOLOGIN'))
                 $dol_authmode=$conf->authmode;	// This properties is defined only when logged, to say what mode was successfully used
                 $dol_tz=$_POST["tz"];
                 $dol_tz_string=$_POST["tz_string"];
-                $dol_tz_string=preg_replace('/\s*\(.+\)/$','',$dol_tz_string);
+                $dol_tz_string=preg_replace('/\s*\(.+\)$/','',$dol_tz_string);
                 $dol_tz_string=preg_replace('/,/','/',$dol_tz_string);
                 $dol_tz_string=preg_replace('/\s/','_',$dol_tz_string);
                 $dol_dst=0;