Method TryRead
- Namespace
- MailFathom.Domain.Access
- Assembly
- MailFathom.Domain.dll
TryRead(string?, out UserTimeZone?)
Reads a zone identifier a record or a client stated.
public static bool TryRead(string? zoneId, out UserTimeZone? zone)
Parameters
zoneIdstringThe identifier, as an IANA name such as
Europe/Warsaw.zoneUserTimeZoneThe resolved zone, or null where the identifier names none this host knows.
Returns
Remarks
A refusal rather than a fallback, at both boundaries this is asked at: a record naming a zone that has left the database, and a client proposing one this host does not carry, are each somebody to tell rather than somebody to quietly read in UTC. The length is checked before the lookup so an implausible value is refused without asking the platform to search for it.