Skip to content

Commit

Permalink
Improve tracing when reading timezone cookie (#863)
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiamurialdo authored Aug 10, 2023
1 parent ff2432b commit 7bd8980
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3616,8 +3616,22 @@ internal string ClientTimeZoneId
}
try
{
_currentTimeZoneId = !DateTimeUtil.ValidTimeZone(sTZ) ? DateTimeZoneProviders.Tzdb.GetSystemDefault().Id : sTZ;

if (!DateTimeUtil.ValidTimeZone(sTZ))
{
try
{
string invalidTimezone = DateTimeZoneProviders.Tzdb[sTZ].Id;
}catch(Exception ex)//DateTimeZoneNotFound
{
GXLogging.Warn(log, $"Client timezone not found: {sTZ}", ex);
}
_currentTimeZoneId = DateTimeZoneProviders.Tzdb.GetSystemDefault().Id;
GXLogging.Warn(log, $"Setting Client timezone to System default: {_currentTimeZoneId}");
}
else
{
_currentTimeZoneId = sTZ;
}
}
catch (Exception e1)
{
Expand Down

0 comments on commit 7bd8980

Please sign in to comment.