validación adicional NowADS

This commit is contained in:
2023-11-07 16:27:40 -07:00
parent dfb095de02
commit 6623d88e6d

View File

@@ -103,12 +103,11 @@ Public Class ClsPaginas
Dim tHora As Integer = 0
'If UsuarioActual IsNot Nothing AndAlso UsuarioActual.Empresa IsNot Nothing Then tHora = UsuarioActual.Empresa.UTCOffset
Try
If HttpContext.Current.Session("UsuarioSIG") IsNot Nothing AndAlso CType(HttpContext.Current.Session("UsuarioSIG"), Usuario).Empresa IsNot Nothing Then tHora = CType(HttpContext.Current.Session("UsuarioSIG"), Usuario).Empresa.UTCOffset
If HttpContext.Current.Session IsNot Nothing AndAlso HttpContext.Current.Session("UsuarioSIG") IsNot Nothing AndAlso CType(HttpContext.Current.Session("UsuarioSIG"), Usuario).Empresa IsNot Nothing Then tHora = CType(HttpContext.Current.Session("UsuarioSIG"), Usuario).Empresa.UTCOffset
Catch ex As Exception
End Try
Return If(tHora <> 0, Now.ToUniversalTime.AddMinutes(tHora), Now)
End Function