Discord
Discord timestamp maker
Turns a date and time into Discord timestamps that show in everyone's own time zone.
GEThttps://api.samplebot.app/v1/timestamp
Prefer a button to click? This tool also works in your browser at samplebot.app/tools/timestamp.
Parameters
| Name | Description | Default |
|---|---|---|
time required | Date and time. | |
tz | The time zone that time is in. | America/New_York |
Send them as query parameters.
Example request
curl
curl "https://api.samplebot.app/v1/timestamp?time=2026-11-14+19%3A00&tz=America%2FNew_York" \
-H "Authorization: Bearer $SAMPLE_API_KEY"
JavaScript (Node 18+)
const res = await fetch("https://api.samplebot.app/v1/timestamp?time=2026-11-14+19%3A00&tz=America%2FNew_York", {
headers: { Authorization: `Bearer ${process.env.SAMPLE_API_KEY}` },
});
const { ok, data, text, error } = await res.json();
if (!ok) throw new Error(error.message);
console.log(data);
Python
import os, requests
res = requests.get(
"https://api.samplebot.app/v1/timestamp",
params={"time":"2026-11-14 19:00","tz":"America/New_York"},
headers={"Authorization": f"Bearer {os.environ['SAMPLE_API_KEY']}"},
)
print(res.json()["data"])
Example reply
This is the real reply to the example request. Long lists are shortened here.
{
"ok": true,
"tool": "timestamp",
"data": {
"unix": 1794700800,
"iso": "2026-11-15T00:00:00.000Z",
"formats": {
"shortTime": "<t:1794700800:t>",
"longTime": "<t:1794700800:T>",
"shortDate": "<t:1794700800:d>",
"longDate": "<t:1794700800:D>",
"shortDateTime": "<t:1794700800:f>",
"longDateTime": "<t:1794700800:F>",
"relative": "<t:1794700800:R>"
}
},
"text": "shortTime: <t:1794700800:t>\nlongTime: <t:1794700800:T>\nshortDate: <t:1794700800:d>\nlongDate: <t:1794700800:D>\nshortDateTime: <t:1794700800:f>\nlongDateTime: <t:1794700800:F>\nrelative: <t:1794700800:R>"
}
Using it in your app
Read data for the values, or post text as it is: it is already formatted for Discord. Check ok first: when it is false, error.message says what went wrong in words you can show your users. Keep your key on your server, never in a web page or a Roblox game.