मुख्य सामग्री पर जाएँ
FreeOnlineTools Go
हिन्दी
explanation

Unix टाइमस्टैम्प क्या है? Epoch टाइम की संपूर्ण व्याख्या

By FreeOnlineTools Team · Updated 2026-09-02

Quick Answer

Unix timestamp 1 जनवरी 1970, 00:00:00 UTC (Unix epoch) से सेकंडों की संख्या है। यह timezone-स्वतंत्र और तुलना में सरल है। JavaScript millisecond (13 अंक); Unix और अधिकांश API सेकंड (10 अंक) उपयोग करते हैं। हमारे मुफ्त Timestamp Converter से बदलें।

Introduction

Unix timestamp (Unix epoch time, POSIX time या Unix time भी) 1 जनवरी 1970, 00:00:00 UTC से बीते सेकंडों की संख्या है —यह क्षण Unix epoch कहलाता है। Timestamp ऑपरेटिंग सिस्टम, डेटाबेस, logs और API में व्यापक उपयोग होते हैं क्योंकि timezone-स्वतंत्र (हमेशा UTC), तुलना में सरल और कॉम्पैक्ट हैं। लेकिन मानव-पठनीय नहीं —1693526400 बिना रूपांतरण के अर्थहीन है।

Step by Step

  1. Understand the Unix epoch

    The Unix epoch is January 1, 1970, 00:00:00 Coordinated Universal Time (UTC). A Unix timestamp is the count of seconds from this moment. Positive timestamps are after the epoch; negative timestamps (supported by some systems) are before it.

  2. Distinguish seconds from milliseconds

    Unix timestamps are typically in seconds (10 digits as of 2026, e.g., 1693526400). JavaScript's Date.now() and Date.getTime() return milliseconds (13 digits, e.g., 1693526400000). Always check which unit an API expects — mixing them is the most common timestamp bug.

  3. Understand timezone independence

    Unix timestamps are always UTC. They do not depend on the user's timezone. To display a timestamp in a specific timezone, convert it to a date and apply the timezone offset. This makes timestamps ideal for storage and comparison.

  4. Learn about the Year 2038 problem

    Systems using 32-bit signed integers for timestamps will overflow on January 19, 2038, 03:14:07 UTC — the 'Y2038 problem'. Systems using 64-bit integers or JavaScript numbers (64-bit floats) are unaffected. Modern systems are largely Y2038-safe, but legacy embedded systems may not be.

Examples

Timestamp for a known date

Input: 2023-09-01 00:00:00 UTC

Output: 1693526400 (seconds) or 1693526400000 (milliseconds)

The Unix epoch

Input: 1970-01-01 00:00:00 UTC

Output: 0

Y2038 problem boundary

Input: 2038-01-19 03:14:07 UTC

Output: 2147483647 (max 32-bit signed integer)

Common Problems

  • Mixing seconds and milliseconds —JavaScript uses milliseconds (Date.now()), Unix and most APIs use seconds. Divide by 1000 to convert ms to seconds; multiply by 1000 for the reverse.
  • Timezone confusion —timestamps are UTC. When displaying, convert to the user's local timezone or specify UTC. Do not apply offsets to the raw timestamp.
  • The Year 2038 problem —32-bit signed integer timestamps overflow on 2038-01-19. Use 64-bit integers or JavaScript numbers to avoid this.
  • Negative timestamps —dates before 1970-01-01 have negative timestamps. Some systems do not support them.

Tips

  • Always check whether an API expects seconds or milliseconds —this is the most common timestamp bug.
  • Use ISO 8601 strings (e.g., "2023-09-01T00:00:00Z") for human-readable timestamps in APIs; use Unix epoch for storage and computation.
  • JavaScript Date.now() returns milliseconds; divide by 1000 and floor to get seconds.
  • Use our Timestamp Converter to convert between timestamps and human-readable dates in your browser.

Related Tools

Related Guides

References