File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
dotnet/src/dotnetframework/GxClasses/Core Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -3616,8 +3616,22 @@ internal string ClientTimeZoneId
36163616 }
36173617 try
36183618 {
3619- _currentTimeZoneId = ! DateTimeUtil . ValidTimeZone ( sTZ ) ? DateTimeZoneProviders . Tzdb . GetSystemDefault ( ) . Id : sTZ ;
3620-
3619+ if ( ! DateTimeUtil . ValidTimeZone ( sTZ ) )
3620+ {
3621+ try
3622+ {
3623+ string invalidTimezone = DateTimeZoneProviders . Tzdb [ sTZ ] . Id ;
3624+ } catch ( Exception ex ) //DateTimeZoneNotFound
3625+ {
3626+ GXLogging . Warn ( log , $ "Client timezone not found: { sTZ } ", ex ) ;
3627+ }
3628+ _currentTimeZoneId = DateTimeZoneProviders . Tzdb . GetSystemDefault ( ) . Id ;
3629+ GXLogging . Warn ( log , $ "Setting Client timezone to System default: { _currentTimeZoneId } ") ;
3630+ }
3631+ else
3632+ {
3633+ _currentTimeZoneId = sTZ ;
3634+ }
36213635 }
36223636 catch ( Exception e1 )
36233637 {
You can’t perform that action at this time.
0 commit comments