Class WorldTimeText
The world time written as text, to the millisecond: what an admin types to set the clock, and what every readout shows. One form for the in-game commands, the Control Panel and the editor.
public static class WorldTimeText
- Inheritance
-
WorldTimeText
- Inherited Members
Remarks
A world timestamp. World time is seconds since the calendar epoch, and the epoch is a real
instant (UnixSeconds), so a moment is written as the
ISO date and time it would be on that count: 2026-10-06 14:30:00.250. It is exact, needs no
calendar asset (the Control Panel has none), and sorts and compares as text does. The game's own
calendar date is a reading of it, shown beside it where the calendar is loaded.
Or a change. +1h, -90s, +2d3h4m5.25s: that much world time from the
moment given as "now". Units d, h, m, s and ms; a bare number is seconds.
Fields
Format
public const string Format = "yyyy-MM-dd HH:mm:ss.fff"
Field Value
Methods
Pace(double)
A pace as text: "held", "real time", "60×".
public static string Pace(double rate)
Parameters
ratedouble
Returns
TryRead(string, long, double, out double, out string)
Reads a world timestamp, or a change from now, into world seconds. False with
a reason when it is neither.
public static bool TryRead(string text, long epochUnixSeconds, double now, out double worldSeconds, out string error)
Parameters
Returns
TryReadDuration(string, out double)
Seconds from "2d3h4m5.25s", "90", "500ms". A bare number is seconds.
public static bool TryReadDuration(string text, out double seconds)
Parameters
Returns
Write(double, long)
The world timestamp of a moment, to the millisecond.
public static string Write(double worldSeconds, long epochUnixSeconds)