2min snip

Syntax - Tasty Web Development Treats cover image

720: Where Does Time Come From?

Syntax - Tasty Web Development Treats

NOTE

Utilizing Epoch Time for Efficient Date Storage and the Y2K 2038 Problem

Epoch time, the number of seconds elapsed since January 1st 1970, provides a convenient way to store time as an integer. Converting dates to epoch time is beneficial for saving and accessing dates in databases. However, a potential issue, known as the 2038 problem, arises due to the representation of epoch time as a 32-bit integer, causing overflow and breaking epoch times on January 19th, 2038. To address this, many systems have transitioned to 64-bit integers for defining epoch time. JavaScript, on the other hand, stores epoch time as 16-bit floating point numbers, thus avoiding the 2038 problem. Consequently, JavaScript has been updated to handle epoch time effectively without being affected by the 2038 problem.

00:00

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode