declare @dateHeureDebut datetime;
declare @dateHeureFin datetime;
declare @dateHeureDebutlocal datetime;
declare @dateHeureFinlocal datetime;
---------------------
set @dateHeureDebut = '20230123 00:00:00';
set @dateHeureFin = '20230129 23:59:59';
set @dateHeureDebutlocal = DATEADD(DAY,-1,@dateHeureDebut);
set @dateHeureFinlocal = DATEADD(DAY,1,@dateHeureFin);
set @dateHeureDebutlocal = DATEADD(MINUTE,-1*DATEPART(tz, @dateHeureDebutlocal AT TIME ZONE 'Central European Standard Time'),@dateHeureDebutlocal);
set @dateHeureFinlocal = DATEADD(MINUTE,-1*DATEPART(tz, @dateHeureFinLocal AT TIME ZONE 'Central European Standard Time'),@dateHeureFinLocal);