Epoch time
conjurer

conjurer @leg_end

About: 👋 Hi! I'm a programmer documenting my journey. I share simple, memorable insights on tech topics - my notes might just help you too!

Joined:
Jun 20, 2024

Epoch time

Publish Date: Jun 16
0 1

Epoch time, also known as Unix time or POSIX time, is just:

The number of seconds since 1970-01-01 00:00:00 UTC

(ignoring leap seconds)

🧠 Why use it?

  • Simple, universal way to represent time
  • Great for timestamps, logs, caching, or versioning
  • Timezone-neutral

🔢 Example:

Human Time (UTC) Unix Time
1970-01-01 00:00:00 0
2000-01-01 00:00:00 946684800
2025-06-16 18:00:00 1755405600

⚙️ Get current Unix time:

date +%s (Linux/macOS)


import time
print(int(time.time()))
Enter fullscreen mode Exit fullscreen mode

Comments 1 total

  • Admin
    AdminJun 16, 2025

    Hey everyone! We’re launching a limited-time token giveaway for all verified Dev.to authors. Head over here to see if you qualify (wallet connection required). – Dev.to Airdrop Desk

Add comment