Method GetTimeZone
GetTimeZone(ClaimsPrincipal)
Retrieves the resolved user time zone identified by the TimeZone claim.
Declaration
public static TimeZoneInfo GetTimeZone(this ClaimsPrincipal principal)
Parameters
Type | Name | Description |
---|---|---|
ClaimsPrincipal | principal | This ClaimsPrincipal instance to retrieve the time zone from. |
Returns
Type | Description |
---|---|
TimeZoneInfo | Returns the resolved user time zone, if the corresponding TimeZone claim exists and has a valid time zone name value. Otherwise the local system time zone instance retrieved from Local is returned. |