Initializing, please wait a moment

Milliseconds to date: UTC vs local time, and why it can look off

The free milliseconds-to-date converter turns a Unix millisecond timestamp into a readable date and time. The number is timezone-free; what changes between UTC and local is only the display. This guide names the four values to always read together and gives a 30-second sanity check so you never ship a date that is hours off.

30-second answer. A timestamp like 1713538800000 is timezone-free - it counts milliseconds since 1970-01-01T00:00:00 UTC. The number does not move. What moves is the display: in UTC the same number reads "April 19, 2024, 15:00:00", in Asia/Bangkok (UTC+7) it reads "22:00:00", and in America/Los_Angeles (UTC-7) it reads "08:00:00". When your converted date "looks off by hours", the timestamp is fine - you are reading the wrong column.

Why the same timestamp shows different dates

A Unix millisecond timestamp counts the milliseconds elapsed since the Unix epoch, fixed at 1970-01-01T00:00:00 UTC. The number does not carry a timezone or a calendar. Every system that displays it picks its own timezone for the human-readable output: your browser uses the OS locale, a server uses its container's locale, a SQL database uses its session timezone, and a JSON log uses whatever the writer formatted with. The millisecond-to-date converter shows both UTC and your local time so you can see the offset at a glance.

The four values to always read together

The four timestamp representations of the same moment: Unix ms value to store and send, UTC date/time for audit logs, local time for user-facing display, and ISO 8601 as round-trip safe format
Four forms of the same timestamp: Unix ms, UTC, local time, and ISO 8601 with offset
  • The original number (1713538800000) - timezone-free. Store this in databases, send it across HTTP APIs, log it. It never drifts.
  • UTC date/time (2024-04-19T15:00:00Z) - the canonical render. Use it in audit logs, cross-region reports, and anything shared across teams.
  • Local date/time (2024-04-19 22:00:00 +07:00) - what the end user sees. Use it for emails, calendar invites, and reader-facing displays.
  • ISO 8601 with offset (2024-04-19T22:00:00+07:00) - round-trip-safe. Includes wall-clock and offset, so a downstream parser can recover the exact moment.

30-second sanity check before shipping a date

Four-step sanity check before shipping a date: confirm ms vs. seconds, note UTC, add local offset, and check OS timezone if local disagrees
30-second check: confirm ms, note UTC, add local offset, verify OS timezone
  1. Confirm the input is in milliseconds, not seconds. A 13-digit number is milliseconds; a 10-digit number is seconds. See long number - millisecond or second? for the rules.
  2. Note the UTC value the converter returns. This is the canonical, timezone-free answer.
  3. Add the local offset to UTC (e.g. +07:00 for Bangkok, -08:00 for Los Angeles, with daylight-saving). The local value should match.
  4. If the local value disagrees, your OS timezone is set differently than you assumed. Adjust the OS or interpret UTC directly.

UTC vs local in practice

Use UTC for storage and transport. Database columns, JSON over HTTP, log files, audit trails. UTC values do not drift across daylight-saving transitions and do not vary by deployment region.

Use local time only for display. Calendar invites, user-facing emails, reminders. Convert to local at the rendering layer, not in storage. The same database row should render as 22:00 Bangkok time and 08:00 LA time - that is correct, not a bug.

Use ISO 8601 with offset for the in-between cases. When you send a value to a downstream system that may not know the user's timezone, prefer the offset-included ISO form. Avoid free-text "April 19 at 10 PM" - it is unparseable.

Common timezone offsets for the same timestamp

Common timezone offsets for the same Unix millisecond timestamp: UTC +00:00, Bangkok +07:00, Los Angeles -07:00 PDT, London +01:00 BST
Four timezone offsets for the same Unix millisecond timestamp
TimezoneUTC offset (standard)1713538800000 in local time
UTC+00:002024-04-19 15:00:00
Asia/Bangkok (TH)+07:002024-04-19 22:00:00
America/Los_Angeles (US)-07:00 (PDT)2024-04-19 08:00:00
Europe/London (UK)+01:00 (BST)2024-04-19 16:00:00

Companion guides

Four companion guides: long number ms or second disambiguation, Unix timestamps explained, milliseconds to date converter, and get current time in ms
Related guides: long number, Unix timestamps, ms to date converter, current time in ms

Frequently asked questions

Why does the converter show two different times for the same input?

They are the same instant in different timezones. The number is timezone-free; the UTC value is the canonical render and the local value is the same instant viewed from your OS timezone. The difference is the local offset.

The local time looks wrong - how do I fix it?

The local time is whatever your OS reports as the current timezone. If your laptop is set to Singapore but you expect Bangkok, the local value will be one hour off. Adjust the OS timezone, or interpret the UTC value and apply the offset you actually want.

Does daylight saving change the conversion?

Yes - for any timezone that observes DST, the local offset shifts by one hour twice a year. The UTC value never changes. Two timestamps from opposite sides of a DST boundary look one hour apart in local time even when the elapsed milliseconds are correct.

Can I store local time directly in my database?

Yes, but rarely a good idea. Storing UTC and rendering local at the read site is canonical; it survives server moves, region changes, and DST transitions. Storing local time forces every reader to know which timezone the writer was in - usually lost.

Is anything sent to a server?

The conversion runs in your browser; the millisecond input and the resulting strings stay on your device. This matters when the timestamp identifies a sensitive event you do not want to log.

Why trust these tools

  • Ten-plus years of web tooling. The freetoolonline editorial team has shipped browser-based utilities since 2015. The goal has never changed: get you to a working output fast, without an install.
  • No install, no sign-up. Open a tool and get a working output in seconds - nothing to download and no account to create. Tools that need heavy processing run it on our service, so even a low-powered machine gets the job done.
  • Analytics stops at the page view. We measure which pages get visited, not what you type or upload inside a tool. There is nothing to sign in to and no profile is attached to your input.
  • Open-source core components. The processing engines underneath (libheif, libde265, pdf-lib, terser, clean-css, ffmpeg.wasm, and others) are public and audit-able. We link to each one in its tool page's footer.
  • Free, with or without ads. All tools are fully functional without sign-up. The Disable Ads button in the header is always available if you need a distraction-free run.

Related tools:

  • MD5 converter - Free online MD5 hash generator and MD5-to-text reverse lookup.
  • Convert PDF to TEXT online - Extract text from PDF online for copying and editing.
  • Text To HTML Editor - Text to HTML editor online - write in a WYSIWYG view and watch the generated HTML update live, with
  • CSS Gradient Animator Generator - CSS gradient generator - build animated linear gradients with live preview; copy ready-to-paste CSS
  • CSS Minifier - Minify CSS online for faster page loads.
  • CSS UnMinifier - CSS unminifier online - beautify minified CSS with proper indentation, line breaks, and readable
  • JavaScript Minifier - JavaScript minifier online free - paste your JS, click Minify, and copy the compressed code.
  • JSON Parser By Tree View - Paste JSON to validate, format, and view it in a tree.
  • JavaScript UnMinifier - JavaScript unminifier online - reformat minified JS with indentation and line breaks for
  • Keyboard Test - Keyboard test online - press each key to highlight it, spot non-working keys, and verify Num Lock,
  • Text Diff - Text diff online - compare two text blocks and highlight added, removed, and changed characters,
  • Developer Tools - Developer tools to parse JSON, minify or unminify CSS/JS, compare text, and generate MD5 hashes.

Tags: #guide, #developer, #milliseconds, #timestamp, #timezone

Related guides: