# Epoch Converter — Full Documentation > A free, client-side Unix epoch timestamp converter at https://timestampconverter.ai/. No signup, no tracking, no server requests. ## Overview Epoch Converter (timestampconverter.ai) is a browser-based developer tool that converts between Unix epoch timestamps and human-readable dates. All processing happens client-side in JavaScript — nothing is sent to a server. It's designed for developers, sysadmins, and anyone working with Unix timestamps. ## Core Features ### 1. Timestamp Conversion - Paste any Unix epoch (seconds or milliseconds) to get human-readable dates - Paste any date string to get the epoch timestamp - Auto-detects whether input is seconds (10 digits) or milliseconds (13 digits) - Outputs in 8 formats simultaneously: Epoch (s), Epoch (ms), UTC, local timezone, ISO 8601, RFC 2822, SQL/UTC, Relative time ### 2. Timezone Support Supports 35 timezones including: - Americas: New York, Chicago, Denver, Los Angeles, Anchorage, Honolulu, São Paulo, Toronto, Vancouver, Mexico City - Europe: London, Paris, Berlin, Amsterdam, Madrid, Rome, Zurich, Moscow, Istanbul - Asia: Dubai, Mumbai, Shanghai, Hong Kong, Tokyo, Seoul, Singapore, Bangkok, Jakarta - Oceania: Sydney, Melbourne, Auckland - Africa: Cairo, Johannesburg, Lagos ### 3. World Clock Live world clock showing current time in 8 major cities (New York, Chicago, Denver, Los Angeles, London, Tokyo, Shanghai, Sydney), updated every second. ### 4. Time Travel (Nudge) After converting a timestamp, use nudge buttons to shift time: - Backward: -1 week, -1 day, -1 hour, -1 minute - Forward: +1 minute, +1 hour, +1 day, +1 week - Text shortcuts: type `+1h`, `-30m`, `+2d`, `+1mo`, `+1y` etc. ### 5. Code Examples Epoch conversion code snippets in 6 languages, each with "Epoch to Date" and "Date to Epoch" examples: #### JavaScript ```javascript // Epoch → Date const date = new Date(1700000000 * 1000); console.log(date.toISOString()); // "2023-11-14T22:13:20.000Z" // Date → Epoch const epoch = Math.floor(Date.now() / 1000); const ts = new Date("2024-01-15").getTime() / 1000; ``` #### Python ```python from datetime import datetime, timezone # Epoch → Date dt = datetime.fromtimestamp(1700000000, tz=timezone.utc) # Date → Epoch import time epoch = int(time.time()) ``` #### PHP ```php // Epoch → Date $date = date('Y-m-d H:i:s', 1700000000); $dt = new DateTime("@1700000000"); // Date → Epoch $epoch = time(); $epoch = strtotime("2024-01-15 14:30:00"); ``` #### SQL ```sql -- Epoch → Date (MySQL) SELECT FROM_UNIXTIME(1700000000); -- (PostgreSQL) SELECT TO_TIMESTAMP(1700000000); -- (SQLite) SELECT datetime(1700000000, 'unixepoch'); -- Date → Epoch (MySQL) SELECT UNIX_TIMESTAMP(); -- (PostgreSQL) SELECT EXTRACT(EPOCH FROM NOW()); ``` #### Java ```java // Epoch → Date Instant instant = Instant.ofEpochSecond(1700000000L); ZonedDateTime zdt = instant.atZone(ZoneId.of("UTC")); // Date → Epoch long epoch = Instant.now().getEpochSecond(); long epochMs = System.currentTimeMillis(); ``` #### Go ```go // Epoch → Date t := time.Unix(1700000000, 0) fmt.Println(t.UTC()) // 2023-11-14 22:13:20 +0000 UTC // Date → Epoch epoch := time.Now().Unix() ms := time.Now().UnixMilli() ``` ### 6. Keyboard Shortcuts - `Ctrl/Cmd + K` — Focus converter input - `Ctrl/Cmd + V` — Paste & auto-convert (works from anywhere on page) - `Ctrl/Cmd + Shift + C` — Copy current epoch (seconds) - `Ctrl/Cmd + Shift + M` — Copy current epoch (milliseconds) - `Ctrl/Cmd + Shift + I` — Copy current ISO timestamp - `+/-Ns,m,h,d,w,mo,y` — Add/subtract time from converted value - `?` — Open keyboard shortcuts help - `Esc` — Close modal ### 7. URL Parameters & Share Share specific timestamps via URL: - `?ts=1700000000` — auto-converts on page load - `?ts=1700000000&tz=Asia/Tokyo` — with specific timezone The Share button (top-right header) builds a shareable URL from the current input value and selected timezone, then copies it to your clipboard. ### 8. Copy to Clipboard Click any conversion result to copy its value. Toast notification confirms the copy. ### 9. Reference Section A collapsible panel with: - **Seconds vs Milliseconds**: side-by-side comparison showing digit count, resolution, and which languages use each format - **Notable Timestamps**: clickable table of key epoch values (Unix epoch, Y2K, Unix Billion, decade starts, Year 2038). Clicking any row loads it into the converter. ## Frequently Asked Questions ### What is Unix epoch time? Unix epoch time (also called POSIX time or Unix time) is the number of seconds that have elapsed since January 1, 1970 at 00:00:00 UTC. This date is known as the "Unix epoch." It provides a simple, timezone-independent way to represent a point in time as a single integer. ### What is the Year 2038 problem? The Year 2038 problem affects 32-bit systems that store Unix time as a signed 32-bit integer. The maximum value (2,147,483,647) corresponds to January 19, 2038 at 03:14:07 UTC. After this moment, the integer overflows and wraps to a negative number, causing the date to jump back to December 13, 1901. Modern 64-bit systems are not affected and can represent dates for approximately 292 billion years. ### What is the difference between epoch seconds and milliseconds? Epoch seconds are typically 10 digits (e.g., `1700000000`) and count whole seconds since the Unix epoch. Epoch milliseconds are 13 digits (e.g., `1700000000000`) and include sub-second precision. JavaScript's `Date.now()` returns milliseconds; Python's `time.time()` returns seconds (with decimal). This tool auto-detects which format you've entered. ### How do I convert epoch time in my programming language? See the Code Examples section above for conversion snippets in JavaScript, Python, PHP, SQL, Java, and Go. The general pattern: multiply epoch seconds by 1000 for languages that use milliseconds (JavaScript, Java), or use built-in timestamp functions (Python's `datetime.fromtimestamp()`, PHP's `date()`). ### Is epoch time affected by timezones? No. Epoch time is always based on UTC. The same epoch value represents the same instant in time regardless of timezone. When you convert an epoch to a human-readable date, that's when timezone matters — the same epoch will show different clock times in different timezones. ### Is epoch time affected by daylight saving time? No. Since epoch time is based on UTC, which does not observe daylight saving time, epoch timestamps are continuous and unambiguous. DST only affects the human-readable representation when converting to a local timezone. ### What are some notable epoch timestamps? - `0` — January 1, 1970 00:00:00 UTC (the Unix epoch) - `1000000000` — September 9, 2001 01:46:40 UTC (the "billion second" milestone) - `1234567890` — February 13, 2009 23:31:30 UTC - `2000000000` — May 18, 2033 03:33:20 UTC - `2147483647` — January 19, 2038 03:14:07 UTC (32-bit overflow) ### Does this tool send my data to a server? No. Epoch Converter runs entirely in your browser. There are no API calls, no tracking, no cookies, and no data collection. The page works offline after initial load. ## Technical Details - **Runtime**: 100% client-side JavaScript, no framework - **Styling**: Tailwind CSS (CDN), Inter + JetBrains Mono fonts - **Theme**: Dark mode only - **Hosting**: Static site (GitHub Pages compatible) - **Dependencies**: None (no npm, no build step) - **License**: Open source ## URL https://timestampconverter.ai/