Sometimes we need to configure a time zone, for example when we have to convert naieve timestamps to timezone-aware ones and want to configure which time zone to apply.
If a field is annotated as ZoneInfo, the parser would take a string value like "Europe/Amsterdam" from TOML and inject the respective ZoneInfo instance into the dataclass. The serialization to string could use the ZoneInfo.key property.
Sometimes we need to configure a time zone, for example when we have to convert naieve timestamps to timezone-aware ones and want to configure which time zone to apply.
If a field is annotated as
ZoneInfo, the parser would take a string value like "Europe/Amsterdam" from TOML and inject the respectiveZoneInfoinstance into the dataclass. The serialization to string could use theZoneInfo.keyproperty.