Skip to content

Configuration

imshooter edited this page Nov 26, 2026 · 1 revision

The zone of the server

"chrono": {
    "time_zone": "Europe/London"
}

time_zone is a name of the time zone database, as America/New_York, Europe/Berlin or Asia/Tokyo. Left empty, the zone of the machine is used. Daylight saving time follows the zone, so Europe/London is an hour ahead of UTC in summer.

A script changes it while the server runs with SetChronoTimeZone, and reads it with GetChronoTimeZone.

The zone of a call

Every native that reads or writes a date takes a zone last, which wins over the zone of the server for that call:

new
    text[16]
;

TimeFormat(Now(), "%H:%M", text, .zone = "Asia/Tokyo");

"UTC" writes and reads times in UTC, as pawn-chrono did. A zone that does not exist makes the call fail.

Times the clocks skip or repeat

When the clocks go forward, an hour of that day does not exist, and when they go back, an hour comes twice. A time in such an hour, given to TimeParse or MakeTimestamp, is taken as the earliest it can be.

Clone this wiki locally