Timestamp Converter

Current timestamp: 1513199747

Countdown to: 1513200000

Convert timestamp

Convert date

How It Works

Timestamp Online is timestamp converver between unix timestamp and human readable form date. If you want to convert timestamp, it is sufficient to either enter your timestamp into input area, or you can construct URL with your timestamp - http://timestamp.onlinetimestamp/{your-timestamp}.

Timestamp Online also supports countdown, so you can see, how much time remains to particular timestamp. URLs for countdowns have following form - http://timestamp.onlinecountdown/{your-timestamp}.

Unix Time

Unix time (also known as POSIX time or Epoch time) is a system for describing instants in time, defined as the number of seconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970, not counting leap seconds. It is used widely in Unix-like and many other operating systems and file formats. Because it does not handle leap seconds, it is neither a linear representation of time nor a true representation of UTC.

Current Timestamp Examples

These examples are showing how to get current unix timestamp in seconds. These examples are returning timestamp in seconds, although some of the languages are returning timestamp in milliseconds.

JavaScript
new Date().getTime()/1000;
Python
import time;
time.time()
Java
long ts = System.currentTimeMillis()/1000;
PHP
time();
Bash
date +"%s"

Current Date and Time Examples

These examples are showing how to get current date and time that could be presented to the end-user.

JavaScript
new Date().toLocaleString();
Python
import datetime;
datetime.datetime.now().isoformat()
PHP
date("Y-m-d H:i:s", time());
Bash
date

Timestamp to Date Examples

These examples are showing how to convert timestamp - either in milliseconds or seconds to human readable form.

JavaScript
new Date(1.513199747E+12).toLocaleString();
Python
import datetime
datetime.datetime.fromtimestamp(1513199747).isoformat()
Java
import Java.Util.Date;
import java.text.SimpleDateFormat;
Date currentDate = new Date (1.513199747E+12)
SimpleDateFormat dateFormat = new SimpleDateFormat("YYYY-MM-dd HH:mm:ss")
String date = dateFormat.format(currentDate);
PHP
date("Y-m-d H:i:s", 1513199747);
Bash
date +"%Y-%m-%d %H:%M:%S" -d @1513199747

Date to Timestamp Examples

These examples are showing how to convert date in human readable form to unix timestamp in either milliseconds or seconds.

JavaScript
Date.parse("2017-12-13 22:15:47")/1000;
Python
import time
int(time.mktime(time.strptime("2017-12-13 22:15:47"))) - time.timezone
Java
import java.text.SimpleDateFormat;
SimpleDateFormat dateFormat = new SimpleDateFormat("YYYY-MM-dd HH:mm:ss")
long ts = dateFormat.parse(2017-12-13 22:15:47).getTime()/1000;
PHP
strtotime("2017-12-13 22:15:47");
Bash
date +"%s" -d "2017-12-13 22:15:47"
This website uses cookies to ensure you get the best experience on our website. More info