Table of Contents

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

schema UserDateSchema

Returns

DateTime?

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

schema UserDateSchema
targetTimeZone TimeZoneInfo

Returns

DateTime?

Remarks

For timestamps without an explicit offset, parsing uses the local machine time zone.

Exceptions

ArgumentNullException

Thrown when targetTimeZone is null.