Time Converter
Time converter
Section titled “Time converter”Converts the Time to either UNIX or ISO 8601
GET /api/time/time-converter
https://api.cookie-api.com/api/time/time-converter Authentication Learn how to get your API Key and use it in your requests!
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
time | unix iso | Yes | Either UNIX or ISO 8601 timestamp |
Request examples
Section titled “Request examples”curl --location 'https://api.cookie-api.com/api/time/time-converter?time=1745140452' \--header 'Authorization: API_Key'import requests
url = 'https://api.cookie-api.com/api/time/time-converter?time=1745140452'headers = { 'Authorization': 'API_Key'}
response = requests.get(url, headers=headers)print(response.json())const fetch = require('node-fetch');
const url = 'https://api.cookie-api.com/api/time/time-converter?time=1745140452';const headers = { 'Authorization': 'API_Key'};
fetch(url, { method: 'GET', headers}).then(res => res.json()).then(data => console.log(data)).catch(err => console.error(err));package main
import ( "fmt" "io/ioutil" "log" "net/http")
func main() { url := "https://api.cookie-api.com/api/time/time-converter?time=1745140452" req, err := http.NewRequest("GET", url, nil) if err != nil { log.Fatal(err) } req.Header.Set("Authorization", "API_Key")
client := &http.Client{} resp, err := client.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body) if err != nil { log.Fatal(err) }
fmt.Println("Response:", string(body))}const https = require('https');
const options = { hostname: 'api.cookie-api.com', path: '/api/time/time-converter?time=1745140452', method: 'GET', headers: { 'Authorization': 'API_Key' }};
const req = https.request(options, res => { let data = ''; res.on('data', chunk => { data += chunk; }); res.on('end', () => { console.log(JSON.parse(data)); });});
req.on('error', error => { console.error(error);});
req.end();require 'net/http'require 'json'require 'uri'
url = URI.parse('https://api.cookie-api.com/api/time/time-converter?time=1745140452')request = Net::HTTP::Get.new(url)request['Authorization'] = 'API_Key'
response = Net::HTTP.start(url.hostname, url.port, use_ssl: true) do |http| http.request(request)end
puts JSON.parse(response.body)use reqwest::blocking::Client;use reqwest::header::HeaderMap;use serde_json::Value;
fn main() { let url = "https://api.cookie-api.com/api/time/time-converter?time=1745140452"; let client = Client::new(); let mut headers = HeaderMap::new(); headers.insert("Authorization", "API_Key".parse().unwrap());
let res = client.get(url) .headers(headers) .send() .unwrap();
let json: Value = res.json().unwrap(); println!("{:#?}", json);}Responses
Section titled “Responses”{ "iso": "2025-08-10T11:26:07.892140", "success": true, "unix": 1754817967}Time converter
Section titled “Time converter”Converts the Time to either UNIX or ISO 8601
GET /api/v2/time/time_converter
https://api.cookie-api.com/api/v2/time/time_converter Authentication Learn how to get your API Key and use it in your requests!
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
timestamp | unix iso | Yes | Either UNIX or ISO 8601 timestamp |
format | string | Yes | Output format |
Formats
Section titled “Formats”| Format | Example | Definition |
|---|---|---|
| yyyy | 2025 | 4-digit year |
| yy | 25 | 2-digit year |
| MMMM | September | Full month name |
| MMM | Sep | Abbreviated month name |
| MM | 09 | 2-digit month number |
| M | 9 | Month number without leading zero |
| dddd | Friday | Full day of the week |
| ddd | Fri | Abbreviated day of the week |
| dd | 05 | 2-digit day of the month |
| d | 5 | Day of the month without leading zero |
| HH | 14 | Hour in 24-hour format (2 digits) |
| H | 14 | Hour in 24-hour format (no leading zero) |
| hh | 02 | Hour in 12-hour format (2 digits) |
| h | 2 | Hour in 12-hour format (no leading zero) |
| mm | 07 | Minutes (2 digits) |
| m | 7 | Minutes (no leading zero) |
| ss | 03 | Seconds (2 digits) |
| s | 3 | Seconds (no leading zero) |
| tt | PM | AM/PM designator |
| fff | 456 | Milliseconds (3 digits) |
| fffffff | 4567890 | 100-nanosecond intervals (7 digits) |
| K | Z | Time zone info (UTC = “Z”, otherwise ±hhmm) |
Request examples
Section titled “Request examples”curl --location 'https://api.cookie-api.com/api/v2/time/time_converter?timestamp=1757102734&format=MMMM%2C%20dd' \--header 'Authorization: API_Key'import requests
url = 'https://api.cookie-api.com/api/v2/time/time_converter'params = { 'timestamp': '1757102734', 'format': 'MMMM, dd'}headers = { 'Authorization': 'API_Key'}
response = requests.get(url, headers=headers, params=params)print(response.json())const fetch = require('node-fetch');
const url = 'https://api.cookie-api.com/api/v2/time/time_converter?timestamp=1757102734&format=MMMM%2C%20dd';const headers = { 'Authorization': 'API_Key'};
fetch(url, { method: 'GET', headers }) .then(res => res.json()) .then(data => console.log(data)) .catch(err => console.error('Error:', err));package main
import ( "fmt" "io/ioutil" "log" "net/http")
func main() { url := "https://api.cookie-api.com/api/v2/time/time_converter?timestamp=1757102734&format=MMMM%2C%20dd"
req, err := http.NewRequest("GET", url, nil) if err != nil { log.Fatal(err) }
req.Header.Set("Authorization", "API_Key")
client := &http.Client{} resp, err := client.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body) fmt.Println(string(body))}const https = require('https');
const options = { hostname: 'api.cookie-api.com', path: '/api/v2/time/time_converter?timestamp=1757102734&format=MMMM%2C%20dd', method: 'GET', headers: { 'Authorization': 'API_Key' }};
const req = https.request(options, res => { let data = '';
res.on('data', chunk => { data += chunk; }); res.on('end', () => { console.log(JSON.parse(data)); });});
req.on('error', error => { console.error(error); });req.end();require 'net/http'require 'uri'require 'json'
uri = URI('https://api.cookie-api.com/api/v2/time/time_converter?timestamp=1757102734&format=MMMM%2C%20dd')request = Net::HTTP::Get.new(uri)request['Authorization'] = 'API_Key'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http| http.request(request)end
puts JSON.parse(response.body)use reqwest::blocking::Client;use reqwest::header::HeaderMap;use serde_json::Value;
fn main() { let client = Client::new(); let url = "https://api.cookie-api.com/api/v2/time/time_converter?timestamp=1757102734&format=MMMM%2C%20dd";
let mut headers = HeaderMap::new(); headers.insert("Authorization", "API_Key".parse().unwrap());
let res = client.get(url).headers(headers).send().unwrap(); let body: Value = res.json().unwrap(); println!("{:#?}", body);}Responses
Section titled “Responses”{ "result": { "formatted": "September, 05", "original": "1757102734" }, "success": true, "errors": [], "messages": []}