prufy
Skip to the page

DevelopmentMove the clock forward

Development

Move the clock forward

Advance the server's clock, so time-based states can be reached by hand.

POST/api/dev/clock

A code expires after 7 days and an at-risk claim lapses after 7 more. This skips the wait. The clock only moves forward, and it resets when the server restarts.

Moving the clock doesn't run anything. Follow it with Run the worker to act on what's now due.

Authentication

No credential needed. How sessions work.

Body

JSON, with content-type: application/json.

  • advanceMsintegerrequired

    How far to move the clock forward, in milliseconds. At most 366 days.

    • 0 to 31,622,400,000

Response

200 OK, with every field below present. Times are ISO 8601 strings in UTC.

  • nowstring

    The server's time after the move.

Errors

StatusKindWhen
400bad_requestThe body isn't JSON, or doesn't match the shape below. message names the first field to fix, and fields lists each one with its path.
404not_foundThe server is running in production.
413payload_too_largeThe body is over 16 KB. No route takes anything near that.

Any route can also answer 500 with internal_error. Every error has the same shape, described in Errors.