Expand description
Locale-dependent timestamp parsing for MTG Arena log entries.
MTGA log timestamps vary by system locale. This module handles all known formats (11+ locale-dependent variants, epoch milliseconds, .NET ticks, and ISO 8601).
§Timestamp semantics
Log entry header timestamps (e.g. 6/19/2026 10:37:13 AM) are local
wall-clock time with no timezone information. parse_log_timestamp parses
them into a NaiveDateTime and promotes the result with .and_utc(), but
this label is misleading — the value is local time, not UTC. See
EventMetadata::local_timestamp() for the honest zone-less accessor.
Embedded event-payload timestamps are the true UTC source:
- Epoch-milliseconds (
"timestamp": <i64>) — decoded byparse_epoch_millisand exposed viaEventMetadata::instant_utc()for match-lifecycle events. - .NET ticks (
"timestamp": "<i64>") — decoded byparse_dotnet_ticks; wiring to additional event types is deferred to a future release.
Enums§
- Timestamp
Error - Error returned when a timestamp cannot be parsed.
Functions§
- parse_
dotnet_ ticks - Parses a .NET ticks value into a UTC datetime.
- parse_
epoch_ millis - Parses a Unix epoch milliseconds value into a UTC datetime.
- parse_
iso8601 - Parses an ISO 8601 datetime string into a UTC datetime.
- parse_
log_ timestamp - Parses a locale-dependent timestamp from an MTGA log entry header.