0
Setting:
I am migrating a Webapi to . NET Core, on Windows is running normally.
Problem
When I am running on Docker (Linux) (Docker-Compose) I am having the following problem:
"The time zone ID 'W. Europe Standard Time' was not found on the local computer."
Code where occurs:
public static DateTime ConvertDateToLanguage(DateTime dDateLocal)
{
var sqlServerRepository = new SqlServerRepository();
var cstZone =
TimeZoneInfo.FindSystemTimeZoneById(
sqlServerRepository.GetImpostazioniSkin().FirstOrDefault()?.FusoOrario ?? string.Empty);
var cstTime = TimeZoneInfo.ConvertTimeFromUtc(dDateLocal.ToUniversalTime(), cstZone);
return cstTime;
}