Table of Contents

Class UserTimeZone

Namespace
MailFathom.Domain.Access
Assembly
MailFathom.Domain.dll

The zone one person's own days are read in, which is what this week and since Tuesday mean for them.

public sealed record UserTimeZone : IEquatable<UserTimeZone>
Inheritance
UserTimeZone
Implements
Inherited Members

Remarks

It answers for what is composed for somebody rather than for what is derived from a mailbox, which is the line UserLanguage already draws. The second half needs no value of its own here: every derivation from a message already carries a better anchor than any zone would supply, because a message's arrival instant carries the sender's own offset from its Date header, and reading Thursday in a message against the reader's zone would move an appointment somebody else named.

A value object rather than a bare identifier, because the two things a caller needs of it cannot be recovered from a string: that the identifier names a zone this host actually knows, and the resolved rules that turn an instant into that person's wall clock. Both are settled once, where the value is made, so nothing downstream resolves an identifier per turn or discovers at composition time that a record names a zone the platform dropped.

The identifier is IANA rather than the Windows form, which is what a browser reports and what a Linux host reads natively; .NET resolves both on either platform, so what a record holds is whatever it was written with and the resolution is the platform's own. The bound is MaximumZoneIdLength rather than a second number, because the two are the same question asked about the same database of names.

Coordinated is the reachable default, and it is the same answer every unresolved read gives: a user this deployment no longer serves, and a record held from before the zone was asked for. A person whose zone nobody stated is therefore shown their mail against UTC rather than against whichever zone the host happens to run in, which is the one answer that is the same on every replica.

Properties

Coordinated

Gets the zone a person whose record states none is read in.

Id

Gets the identifier the zone is recorded under.

Zone

Gets the resolved zone, which is what turns an instant into this person's wall clock.

Methods

Reading(DateTimeOffset)

Reads the wall clock this person is standing on at one instant.

ToString()

Returns a string that represents the current object.

TryRead(string?, out UserTimeZone?)

Reads a zone identifier a record or a client stated.