← Back to Home

Current Time

/time
Get current time in multiple formats including ISO 8601, RFC 2822, Unix timestamp, and individual date/time components.
Try it now

Examples

curl
# Get current time
curl https://tcpdata.com/time
JavaScript (fetch)
const response = await fetch('https://tcpdata.com/time');
const time = await response.json();
console.log('Unix timestamp:', time.unix_timestamp);
console.log('ISO 8601:', time.iso8601);
Python (requests)
import requests

response = requests.get('https://tcpdata.com/time')
time = response.json()
print(f"Current time: {time['iso8601']}")
print(f"Unix timestamp: {time['unix_timestamp']}")