FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Unix Timestamps: What They Are, Why They Break, and How to Convert Them
How-ToWeb Development

Unix Timestamps: What They Are, Why They Break, and How to Convert Them

via Dev.to WebdevMichael Lip2h ago

A Unix timestamp is the number of seconds that have elapsed since January 1, 1970, at 00:00:00 UTC. Right now, that number is somewhere around 1.77 billion. Every date and time in every system you have ever used is, at some layer, backed by a number like this. The simplicity is its strength. A single integer represents a moment in time unambiguously, independent of time zones, date formats, calendar systems, or locale. But that simplicity hides a collection of edge cases that have caused some of the most famous bugs in computing history. Seconds vs. milliseconds JavaScript's Date.now() returns milliseconds since epoch. Most Unix systems use seconds. This is the source of approximately 40% of all timestamp bugs I encounter. Date . now () // 1774000000000 (milliseconds) Math . floor ( Date . now () / 1000 ) // 1774000000 (seconds) If you pass a millisecond timestamp to a function expecting seconds, you get a date in the year 58,000. If you pass seconds to a function expecting millisecond

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
0 views

Related Articles

Tutorials Are Lying to You Here’s What Actually Works ?
How-To

Tutorials Are Lying to You Here’s What Actually Works ?

Medium Programming • 52m ago

Flutter Mistakes That Make Apps Slow ⚡
How-To

Flutter Mistakes That Make Apps Slow ⚡

Medium Programming • 1h ago

Welcome Thread - v370
How-To

Welcome Thread - v370

Dev.to • 1h ago

How to Calculate Your Final Grade When the Syllabus Uses Weighted Categories
How-To

How to Calculate Your Final Grade When the Syllabus Uses Weighted Categories

Dev.to Beginners • 1h ago

How Word Scramble Solvers Use the Same Algorithm as Spell Checkers
How-To

How Word Scramble Solvers Use the Same Algorithm as Spell Checkers

Dev.to Beginners • 2h ago

Discover More Articles