Time Information
The /time endpoint allows you to retrieve time information based on various parameters. You can get the current time or a random time between a specified range, in different formats and time zones.
curl -X GET \ "https://api.moxon.dev/v6/time"Send the request to see the response here.
type"live" | "random" | "countdown"optionallive(default) for current time,randomfor a random time,countdownfor time until a targetstartstringoptionalStart date for
randomrange (format:YYYY-MM-DD)endstringoptionalEnd date for
randomrange (format:YYYY-MM-DD)targetstringoptionalTarget date for
countdownmode (format:YYYY-MM-DDor ISO 8601)formatstringoptionalResponse format (see options below)
- iso
- utc
- timestamp
- locale
- date
- time
- year
- month
- day
- hour
- minute
- second
- ms
- dayOfWeek
- dayOfYear
- weekNumber
- timezone
timezonestringoptionalTime zone to use (see options below)
- UTC
- Europe/Paris
- America/New_York
- Asia/Tokyo
- Australia/Sydney
| Format | Description |
|---|---|
iso | ISO 8601 format (default) |
utc | UTC format |
timestamp | Unix timestamp |
locale | Local format |
date | Date in MM/DD/YYYY format |
time | Time in HH:MM:SS format |
year | Year only |
month | Month only |
day | Day only |
hour | Hour only |
minute | Minutes only |
second | Seconds only |
ms | Milliseconds only |
dayOfWeek | Day of the week (0-6) |
dayOfYear | Day of the year (1-365/366) |
weekNumber | Week number |
timezone | Time zone name |
| Timezone | Description |
|---|---|
UTC | Coordinated Universal Time (default) |
Europe/Paris | Paris time zone |
America/New_York | New York time zone |
Asia/Tokyo | Tokyo time zone |
Australia/Sydney | Sydney time zone |
isostringDate in ISO 8601 format
utcstringDate in UTC string format
timestampnumberUnix timestamp
localestringLocalized date and time string
datestringDate in MM/DD/YYYY format
timestringTime in HH:MM:SS format
yearnumberYear
monthnumberMonth (1-12)
daynumberDay of the month
hournumberHour (0-23)
minutenumberMinutes
secondnumberSeconds
msnumberMilliseconds
dayOfWeeknumberDay of the week (0-6)
dayOfYearnumberDay of the year (1-365/366)
weekNumbernumberWeek number of the year
timezonestringTime zone name
timezoneOffsetnumberUTC offset of the time zone
If parameters are invalid, the API will return an error:
- 400
Please provide a valid type (?type={type})Thetypeparameter is invalid - 400
Please provide a valid start date (?start={YYYY-MM-DD})Thestartparameter is invalid - 400
Please provide a valid end date (?end={YYYY-MM-DD})Theendparameter is invalid - 400
Please provide a valid target date (?target=...)Thetargetparameter is invalid - 400
Please provide a valid format (?format={format})Theformatparameter is invalid - 400
Please provide a valid timezone (?timezone={timezone})Thetimezoneparameter is invalid
Last updated on September 12, 2026