TzDataTimezone Struct
Definition
Namespace: DataStandardizer.Chronology
A TZ Database time zone. You don’t construct these; instead use the predefined static instances, grouped by region and named after the database’s hierarchical identifiers — for example TzDataTimezone.Europe.Berlin and TzDataTimezone.America.Argentina.Buenos_Aires.
public readonly struct TzDataTimezone : IComparable, IEquatable<TzDataTimezone>
Remarks
Per-zone metadata (ISO country codes, latitude, longitude, comment) is read through the extension methods on TzDataExtensions. See Use time zones.
Fields
The time zone instances are grouped by region:
- Africa — 19 time zones
- America — 121 time zones
- Antarctica — 8 time zones
- Asia — 74 time zones
- Atlantic — 8 time zones
- Australia — 11 time zones
- Europe — 38 time zones
- Indian — 3 time zones
- Pacific — 30 time zones
Methods
Implicit implementation
| Method | Returns | Notes |
|---|---|---|
CompareTo(object obj) | int | |
Equals(TzDataTimezone other) | bool | |
Equals(object obj) | bool | Override. |
GetHashCode() | int | Override. |
ToString() | string | Override. Returns the identifier. |
ToString(IFormatProvider provider) | string |
Operators
| Operator | Signature | Notes |
|---|---|---|
| Explicit | explicit operator TzDataTimezone(string) | Wraps an identifier string. |
| Implicit | implicit operator string(TzDataTimezone) | Unwraps to the identifier string. |
| Equality | operator ==, != (TzDataTimezone, TzDataTimezone) |
Applies to
Targets netstandard1.0, netstandard2.0, net8.0, and net10.0.