Table of Contents

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

zoneId string

The identifier, as an IANA name such as Europe/Warsaw.

zone UserTimeZone

The resolved zone, or null where the identifier names none this host knows.

Returns

bool

true where the identifier names a zone this host knows and is within the bound.

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.