UNIX Timestamp Converter

Current Millis

1697343646353
UTC: 15 Oct 2023 4:34:58 Local: UNIX: 1697346138715
Local timezone (UTC+7h):
Link to this moment

Convert Milliseconds to Date

Convert Date to Milliseconds

/ /
: :

Date-Time Calendar

Epochs & standards for reference. Convert date/time formats on the fly. Timestamps in milliseconds and other units.

Milliseconds since Epoch Julian Date HTTP format ISO 8601 GPS time

Tutorials

Timezones, Unix timestamps in milliseconds & UTC. Programming examples and explanations.

System.currentTimeMillis() What is a Unix Timestamp What is UTC

Standards

Software engineering standards for time-keeping. Architectural specifications for 3rd party reference and compliance.

Client-Centric Time Persistence of Time Sync Service
Reference

How to Get Current Time in Milliseconds

Methods to get the time in milliseconds since the UNIX epoch (January 1, 1970 00:00:00 UTC) in various programming languages.

ActionScript(new Date()).time
Bashdate +%s%N | cut -b1-13
C++std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count()
C#.NETDateTimeOffset.UtcNow.ToUnixTimeMilliseconds()
Clojure(System/currentTimeMillis)
DartDateTime.now().millisecondsSinceEpoch
Erlangerlang:system_time(millisecond)
Excel / Sheets*= (NOW() - OFFSET/24 - DATE(1970,1,1)) * 86400000
Go / Golangtime.Now().UnixMilli()
Hive*unix_timestamp() * 1000
Java / KotlinSystem.currentTimeMillis()
JavaScriptDate.now() // or: new Date().getTime()
MySQL*UNIX_TIMESTAMP() * 1000
Objective-C(long long)([[NSDate date] timeIntervalSince1970] * 1000.0)
OCaml(1000.0 *. Unix.gettimeofday ())
Oracle PL/SQL*SELECT (SYSDATE - TO_DATE('01-01-1970','DD-MM-YYYY')) * 86400000 FROM DUAL
Perluse Time::HiRes qw(gettimeofday); print gettimeofday;
PHPround(microtime(true) * 1000)
PostgreSQLextract(epoch FROM now()) * 1000
PowerShell[DateTimeOffset]::UtcNow.ToUnixTimeMilliseconds()
Pythonint(round(time.time() * 1000))
QtQDateTime::currentMSecsSinceEpoch()
R*as.numeric(Sys.time()) * 1000
Ruby(Time.now.to_f * 1000).floor
RustSystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_millis()
ScalaSystem.currentTimeMillis
SQL ServerSELECT DATEDIFF_BIG(MILLISECOND,'1970-01-01',SYSUTCDATETIME())
SQLite*STRFTIME('%s', 'now') * 1000
Swift*NSDate().timeIntervalSince1970 * 1000
VBScript / ASPDateDiff("s", "01/01/1970 00:00:00", Now()) * 1000
CockroachDBextract(epoch_nanoseconds from now()) / 1000000

* Starred examples might not reach millisecond accuracy but the value is multiplied to reach millisecond range.

Epochs

Common Epochs & Date/Time Formats

The most common is the UNIX epoch but some systems and services have different epochs.

Epoch
Value
Reference
UNIX Epoch
ms
since January 1, 1970
LDAP / NT epoch
ticks
since January 1, 1601
NTP epoch
ms
since January 1, 1900
.NET MinValue
ticks
since January 1, 0001
Mac OS X
ms
since January 1, 2001
ISO 8601 (UTC)

* 1 tick = 0.0001 milliseconds = 100 nanoseconds

Knowledge Base

Time & Space

Scientific facts as well as controversies surrounding time keeping.

What does "millis" mean?

Millis is the popular abbreviation for milliseconds. The formal one would be ms. Another one is millisecs but this is very rare.

What are leap seconds?

Leap seconds are one-second adjustments added to the UTC time to synchronize it with solar time. Leap seconds tend to cause trouble with software. For example, on June 30, 2012 you had the time 23:59:60. Google uses a technique called leap smear on its servers, which, instead of adding an extra second, extend seconds prior to the end of the day by a few milliseconds each so that the day will last 1000 milliseconds longer.

How does the Theory of Relativity affect time?

The Special and General theories of Relativity are taken into account by GPS receivers (found in planes, cars and mobile phones) and Earth-orbiting satellites to synchronize their time within a 20-30 nanosecond range. This happens because satellites are in motion relative to the planet so the observers on the planet will perceive time is passing more slowly for the satellites.

What is the difference between UTC and GMT?

UTC stands for Coordinated Universal Time. GMT stands for Greenwich Mean Time. UTC is a universal time keeping standard by itself. A time expressed in UTC is essentially the time on the whole planet. A time expressed in GMT is the time in the timezone of the Greenwich meridian. In current computer science problems UTC and GMT expressed in absolute value happen to have identical values so they have been used interchangeably.

UTC vs. GMT: the complex explanation

UTC essentially appeared in 1960, GMT being the main thing until then. Unlike GMT which is based on solar time, UTC calculates a second as the duration of 9,192,631,770 periods of the radiation corresponding to the transition between the two hyperfine levels of the ground state of the cesium 133 atom. UTC's second is far more precise than GMT's original second.

What is UT1 and how does it relate to UTC?

UT1 is the most precise form of universal time. It's computed using observations of quasars in outer space and of distances between Earth and its satellites. UTC only tries to approximate UT1: it is kept within 0.9 seconds of UT1 by employing leap seconds.

Why is the timezone span 26 hours instead of 24?

Timezones can reach UTC+14. UTC+14 is Christmas Island's (Kiribati) time all year round and Samoa's daylight saving time. Therefore the maximum difference between 2 local times on Earth is 26 hours.

Design Principles

Explicit Persistence

The ability to use software as a service without heavy-weight protocols such as authentication. Avoiding server-side state (sessions) or client-side state (cookies) gives us an incredible opportunity to persist data in something which is shared between humans and processed by machines seamlessly: a URL.

Practical Moonshooting

A continuous succession of development/evaluation iterations for several features at once, to filter out experiments until those features that are useful remain. They are ambitious and ingenious steps, but not over-reaching.

Consistency

To think of consistency as the ability to be remembered is empowering. When you expect a button to be there and it actually is: this is a ticket to a nice ride. When it looks and feels the same across a family of services, you instantly recognize it.

The Story Behind Current Millis

This site provides the current time in milliseconds elapsed since the UNIX epoch (Jan 1, 1970) as well as in other common formats including local/UTC time comparisons. You can also convert milliseconds to date & time and the other way around.

The current millis story started with debugging an Android application. In Android you tell an alarm when to come up by passing a simple number. This number has to encompass all the time passed since midnight January 1st, 1970 but sufficiently small that it can fit into existing data structures.

The goal for this website is that programmers all around the world know: whenever you want to see the current UTC time or the current time in ms, you can do so easily at currentmillis.org.

Support the Website

If you would like to support, you can always send feedback. Feel free to reach out via Noop Mail at [email protected]