Method ToLocalTime
ToLocalTime(DateTimeOffset, ClaimsPrincipal)
Declaration
public static DateTimeOffset ToLocalTime(this DateTimeOffset dateTimeOffset, ClaimsPrincipal principal)
Parameters
Returns
Type |
Description |
DateTimeOffset |
A new DateTimeOffset instance that represents the date and time of the current
DateTimeOffset instance converted to the time zone of the principal
with fallback to the local time of the system.
|
ToLocalTime(Nullable<DateTimeOffset>, ClaimsPrincipal)
Returns a new
System.Nullable<> instance based on the current
System.Nullable<> instance that represents the local time for a given
ClaimsPrincipal's time zone.
Declaration
public static Nullable<DateTimeOffset> ToLocalTime(this Nullable<DateTimeOffset> dateTimeOffset, ClaimsPrincipal principal)
Parameters
Returns
Type |
Description |
System.Nullable<DateTimeOffset> |
A new System.Nullable<> instance that represents the date and time of the current
System.Nullable<> instance converted to the time zone of the
principal with fallback to the local time of the system.
|