diff --git a/htdocs/admin/agenda_extsites.php b/htdocs/admin/agenda_extsites.php
index 9c977346010..c98e6e6ab2f 100644
--- a/htdocs/admin/agenda_extsites.php
+++ b/htdocs/admin/agenda_extsites.php
@@ -74,12 +74,6 @@ if ($actionsave)
if (! $res > 0) $error++;
$i++;
}
-
- // Save timezone
- $timezone=trim(GETPOST("agenda_ext_timezone"));
- if ($timezone=='-1') $timezone='';
- $res=dolibarr_set_const($db,'AGENDA_EXT_TIMEZONE',$timezone,'chaine',0);
- if (! $res > 0) $error++;
// Save nb of agenda
$res=dolibarr_set_const($db,'AGENDA_EXT_NB',trim(GETPOST("AGENDA_EXT_NB")),'chaine',0);
if (! $res > 0) $error++;
@@ -131,14 +125,6 @@ print '
'.$langs->trans("Parameter")." | ";
print "".$langs->trans("Value")." | ";
print "";
-// Timezone
-print "";
-print "| ".$langs->trans("ClientTZ")." | ";
-print "";
-print $formadmin->select_timezone($conf->global->AGENDA_EXT_TIMEZONE,'agenda_ext_timezone');
-print " | ";
-print "
";
-
// Nb of agenda
$var=!$var;
print "";
diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php
index 536b9e5f7ca..2b81cb6d8df 100644
--- a/htdocs/comm/action/index.php
+++ b/htdocs/comm/action/index.php
@@ -511,8 +511,9 @@ if ($conf->global->ENABLE_AGENDA_EXT==1 && $conf->global->AGENDA_EXT_NB>0)
$event->id=$icalevent[UID];
$event->icalname=$namecal;
$event->icalcolor=$colorcal;
- $event->datep=$icalevent[DTSTART];
- $event->datef=$icalevent[DTEND];
+ $usertime=($_SESSION['dol_tz']*60*60)+($_SESSION['dol_dst']*60*60);
+ $event->datep=$icalevent[DTSTART]+$usertime;
+ $event->datef=$icalevent[DTEND]+$usertime;
$event->type_code="ICALEVENT";
$event->libelle=''.$icalevent[SUMMARY].'
'.str_replace("\\n", "
", "$icalevent[DESCRIPTION]");
//$event->fulldayevent=$obj->fulldayevent;