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.
gethttps://api.moxon.dev /v3/time
typestringoptionallive(default) for current time,randomfor random timestartstringoptionalStart date for random range (format:
YYYY-MM-DD)endstringoptionalEnd date for random range (format:
YYYY-MM-DD)formatstringoptionalResponse format (see options below)
timezonestringoptionalTime zone to use (see options below)
| Format | Description |
|---|---|
iso | ISO 8601 format (default) |
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 |
timezoneOffset | Time zone offset |
| 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 |
GET /v3/time{
"iso": "2000-01-01T12:00:00.000Z",
"utc": "Sat, 01 Jan 2000 12:00:00 GMT",
"timestamp": 946724400,
"locale": "1/1/2000, 12:00:00 PM Coordinated Universal Time",
"date": "3/3/2000",
"time": "12:00:00 PM",
"year": 2000,
"month": 1,
"day": 1,
"hour": 12,
"minute": 0,
"second": 0,
"ms": 0,
"dayOfWeek": 6,
"dayOfYear": 1,
"weekNumber": 1,
"timezone": "UTC",
"timezoneOffset": 0
}curl -X GET "https://api.moxon.dev/v3/time?type=random&format=locale&timezone=America/New_York"{
"date": "7/28/2024, 5:06:52 AM Eastern Standard Time"
}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 format (?format={format})Theformatparameter is invalid - 400
Please provide a valid timezone (?timezone={timezone})Thetimezoneparameter is invalid
Last updated on April 8, 2026