Method Restore
- Namespace
- MailFathom.Domain.Scheduling
- Assembly
- MailFathom.Domain.dll
Restore(DateTimeOffset, string)
Restores a value from the instant and the zone identifier a record holds.
public static ZonedInstant Restore(DateTimeOffset instant, string zoneId)
Parameters
instantDateTimeOffsetThe stored instant.
zoneIdstringThe stored zone identifier.
Returns
- ZonedInstant
The instant and the zone it was named in.
Remarks
The identifier is not resolved against the zones this system knows, deliberately. A stored value has already been resolved to an instant, so a zone a later host no longer carries would make the value unreadable without making it wrong.
Exceptions
- ArgumentException
Thrown when
zoneIdis blank or longer than MaximumZoneIdLength.