DateTimeExtensions.ToLocal Method

Namespace:
Weavy.Core.Helpers
Assembly:
Weavy.Core.dll

Overloads

ToLocal(DateTime) Converts an UTC date to local server/user time.
ToLocal(DateTime?) Converts an UTC date to local server/user time.

ToLocal(DateTime)

Converts an UTC date to local server/user time.

public static DateTime ToLocal(this DateTime date)

Parameters

date
System.DateTime

The (UTC) date to localize.

Returns

System.DateTime

Returns the local time for a user.

ToLocal(DateTime?)

Converts an UTC date to local server/user time.

public static DateTime? ToLocal(this DateTime? date)

Parameters

date
System.DateTime?

The (UTC) date to localize.

Returns

System.DateTime?

Returns the local time for a user.