Class UserDateSchemaExtensions
- Namespace
- Auth0.ManagementApi
- Assembly
- Auth0.ManagementApi.dll
Extension methods for UserDateSchema.
public static class UserDateSchemaExtensions
- Inheritance
-
UserDateSchemaExtensions
- Inherited Members
Methods
ToDateTime(UserDateSchema?)
Parses the underlying string value into a DateTime using invariant culture and round-trip kind.
Returns null if the schema is null or does not contain a valid date-time string.
public static DateTime? ToDateTime(this UserDateSchema? schema)
Parameters
schemaUserDateSchema
Returns
ToDateTime(UserDateSchema?, TimeZoneInfo)
Parses the underlying string value into a DateTime, then converts it to the provided time zone.
Returns null if the schema is null or does not contain a valid date-time string.
public static DateTime? ToDateTime(this UserDateSchema? schema, TimeZoneInfo targetTimeZone)
Parameters
schemaUserDateSchematargetTimeZoneTimeZoneInfo
Returns
Remarks
For timestamps without an explicit offset, parsing uses the local machine time zone.
Exceptions
- ArgumentNullException
Thrown when
targetTimeZoneis null.