First add below references.
Namespace: System
Assembly: System. Core (in System. Core. dell)
Sample function that works for all of you.
Create below function in common classes.
Public Function GmtToPacific (ByVal dateTime As DateTime) As DateTime
Return TimeZoneInfo. ConvertTimeFromUtc (dateTime, TimeZoneInfo. FindSystemTimeZoneById ("Pacific Standard Time"))
End Function
Calls this function and pass input date in UTC/GMT format.
Dim objName as new CommonClassName
objName .GmtToPacific(sinceDate.ToUniversalTime.ToString())
Namespace: System
Assembly: System. Core (in System. Core. dell)
Sample function that works for all of you.
Create below function in common classes.
Public Function GmtToPacific (ByVal dateTime As DateTime) As DateTime
Return TimeZoneInfo. ConvertTimeFromUtc (dateTime, TimeZoneInfo. FindSystemTimeZoneById ("Pacific Standard Time"))
End Function
Calls this function and pass input date in UTC/GMT format.
Dim objName as new CommonClassName
objName .GmtToPacific(sinceDate.ToUniversalTime.ToString())