Time
Endpoints for various time functions.
Base URL
https://api.kyle.so/time/now
Returns the current server time in various formats
GET /nowExample:
GET /time/now
Response:
{
"time": {
"unix": {
"seconds": number,
"ms": number
},
"utc": string,
"local": string,
"iso": string,
"date": string,
"time": string,
"day" number,
"month": number,
"year": number,
"hours": number,
"minutes": number,
"seconds": number,
"milliseconds": number,
"timezone": string,
"timezoneName": string
},
"message": string
}/unix
Converts a unix timestamp (seconds) to various formats
GET /unix/:tExample:
GET /time/unix/1709884384
Response:
{
"time": {
"unix": {
"seconds": number,
"ms": number
},
"utc": string,
"local": string,
"iso": string,
"date": string,
"time": string,
"day" number,
"month": number,
"year": number,
"hours": number,
"minutes": number,
"seconds": number,
"milliseconds": number,
"timezone": string,
"timezoneName": string
},
"message": string
}/unix/ms
Converts a unix timestamp (milliseconds) to various formats
GET /unix/ms/:tExample:
GET /time/unix/ms/1709884384193
Response:
{
"time": {
"unix": {
"seconds": number,
"ms": number
},
"utc": string,
"local": string,
"iso": string,
"date": string,
"time": string,
"day" number,
"month": number,
"year": number,
"hours": number,
"minutes": number,
"seconds": number,
"milliseconds": number,
"timezone": string,
"timezoneName": string
},
"message": string
}Last updated
Was this helpful?