---
title: "Time is a construct but it can still break your software"
source_name: "Stack Overflow Blog"
original_url: "https://stackoverflow.blog/2026/05/01/time-is-a-construct-but-it-can-break-your-software/"
canonical_url: "https://www.traeai.com/articles/a0d27e04-83c9-41ec-b1b0-4b3271503425"
content_type: "article"
language: "中文"
score: 7.8
tags: ["JavaScript","Temporal","TC39","前端","时区"]
published_at: "2026-05-01T07:40:00+00:00"
created_at: "2026-05-01T19:24:42.978661+00:00"
---

# Time is a construct but it can still break your software

Canonical URL: https://www.traeai.com/articles/a0d27e04-83c9-41ec-b1b0-4b3271503425
Original source: https://stackoverflow.blog/2026/05/01/time-is-a-construct-but-it-can-break-your-software/

## Summary

JavaScript 的 Date API 存在固有缺陷，Temporal 提案历经九年终成标准，提供不可变、时区安全、高精度的现代时间处理能力。

## Key Takeaways

- Date 对象是可变且易出错的，导致大量隐蔽 bug
- Temporal 通过分离时间概念（Instant/PlainDateTime/ZonedDateTime）实现语义清晰与时区正确性
- 库如 Moment.js 曾缓解问题但自身复杂化，Temporal 是原生、标准化的终极解

## Content

Title: Time is a construct but it can still break your software

URL Source: http://stackoverflow.blog/2026/05/01/time-is-a-construct-but-it-can-break-your-software/

Markdown Content:
# Time is a construct but it can still break your software - Stack Overflow

[Blog](http://stackoverflow.blog/)

[](https://stackoverflow.com/)[](http://stackoverflow.blog/feed)[](https://stackoverflow.com/users/email/settings/current)

 Log in [Sign up](https://stackoverflow.com/users/signup?ssrc=blog&returnurl=https://stackoverflow.blog/2026/05/01/time-is-a-construct-but-it-can-break-your-software/)

*   [Everything](http://stackoverflow.blog/)
*   [Productivity](http://stackoverflow.blog/productivity/)
*   [AI/ML](http://stackoverflow.blog/ai/)
*   [Open Source](http://stackoverflow.blog/open-source/)
*   [Business Hub](http://stackoverflow.blog/business/)

*   [Company](http://stackoverflow.blog/company/)
*   [Releases](http://stackoverflow.blog/releases/)

*   [Podcast](http://stackoverflow.blog/podcast/)
*   [Newsletter](http://stackoverflow.blog/newsletter/)

[Stack Overflow Business](https://stackoverflow.co/)

[**Stack Internal**: the knowledge intelligence layer that powers enterprise AI.](https://stackoverflow.co/internal/?utm_source=so-owned&utm_medium=blog&utm_campaign=nav-side-bar)[**Stack Data Licensing**:decades of verified, technical knowledge to boost AI performance and trust.](https://stackoverflow.co/data-licensing/?utm_source=so-owned&utm_medium=blog&utm_campaign=nav-side-bar)[**Stack Ads**: engage developers where it matters — in their daily workflow.](https://stackoverflow.co/advertising/employer-branding/?utm_source=so-owned&utm_medium=blog&utm_campaign=nav-side-bar)

 May 1, 2026
# Time is a construct but it can still break your software

Ryan welcomes Jason Williams, senior software engineer at Bloomberg and the creator of Rust-based JavaScript engine Boa, to the show to dive into why date and time handling in JavaScript is so difficult and how the Temporal proposal aims to fix it.

![Image 1: Article hero image](https://cdn.stackoverflow.co/images/jo7n4k8s/production/e35a0c5eb319e7928c9ac0a2c2c782d29e644876-3120x1640.png?w=780&h=410&auto=format&dpr=2)

They explore the current flaws and issues in JavaScript that make the Date object so hard to work with, how libraries like Moment.js helped but eventually became too complex themselves, and why the Temporal proposal took nine years to complete.

[Temporal](https://tc39.es/proposal-temporal/docs/) is a new TC39 proposed standard for JavaScript that replaces the Date object. It operates as a top-level namespace and brings a modern date/time API to the ECMAScript language.

Connect with Jason on [Bluesky](https://bsky.app/profile/jason-williams.co.uk) or at [his website](https://jason-williams.co.uk/).

Congrats to Great Answer badge winner [BrenBarn](https://stackoverflow.com/users/1427416/brenbarn), who won the badge for their answer to [rethrowing python exception. Which to catch?](https://stackoverflow.com/questions/25001971/rethrowing-python-exception-which-to-catch).

## Subscribe to the podcast

Get The Stack Overflow Podcast at your favorite listening service.

[Apple Podcasts](https://podcasts.apple.com/us/podcast/the-stack-overflow-podcast/id1483510527)[Overcast](https://overcast.fm/itunes1483510527)[Pocket Casts](https://pca.st/dRBh)[Spotify](https://open.spotify.com/show/0e5eoM6w7eW9Wu7wMA04Tr)[RSS feed](https://stackoverflow.blog/podcast/feed/)

 Author s

[Phoebe Sajor Content Associate Staff ![Image 2: Image of Phoebe Sajor](https://cdn.stackoverflow.co/images/jo7n4k8s/production/5f1073fdcf2ebde7fee8570769d9d82d21573870-2316x3088.jpg?rect=0,386,2316,2316&w=96&h=96&auto=format)](http://stackoverflow.blog/author/phoebe-sajor/ "View full bio and posts")

[The Stack Overflow Podcast](http://stackoverflow.blog/podcast/)[javascript](http://stackoverflow.blog/javascript/)

 Recent articles 

 May 1, 2026# [Dispatches from O'Reilly: Fast Paths and Slow Paths](http://stackoverflow.blog/2026/05/01/dispatches-from-o-reilly-fast-paths-and-slow-paths/)

 April 30, 2026# [The Worst Coder in the World goes agentic: building a leaderboard cracking AI](http://stackoverflow.blog/2026/04/30/worst-coder-in-the-world-goes-agentic/)

 April 28, 2026# [Turning scattered knowledge into trusted intelligence: Stack Internal 2026.3](http://stackoverflow.blog/2026/04/28/turn-scattered-knowledge-into-trusted-intelligence/)

 April 27, 2026# [Welcome to the “find out” stage of AI](http://stackoverflow.blog/2026/04/27/welcome-to-the-find-out-stage-of-ai/)

 Latest Podcast 

 April 28, 2026# [Your LLM issues are really data issues](http://stackoverflow.blog/2026/04/28/your-llm-issues-are-really-data-issues/)

## Add to the discussion

Login with your **stackoverflow.com** account to take part in the discussion.

### Our Stack

*   [Stack Internal](https://stackoverflow.co/internal/?utm_source=blog&utm_medium=referral&utm_campaign=footer)
    *   [Features](https://stackoverflow.co/internal/features/?utm_source=blog&utm_medium=referral&utm_campaign=footer)
    *   [Customers](https://stackoverflow.co/internal/customers/?utm_source=blog&utm_medium=referral&utm_campaign=footer)
    *   [Security](https://stackoverflow.co/internal/security/?utm_source=blog&utm_medium=referral&utm_campaign=footer)
    *   [Pricing](https://stackoverflow.co/internal/pricing/?utm_source=blog&utm_medium=referral&utm_campaign=footer)

*   [Stack Data Licensing](https://stackoverflow.co/data-licensing/?utm_source=blog&utm_medium=referral&utm_campaign=footer)
*   [Stack Ads](https://stackoverflow.co/advertising/?utm_source=blog&utm_medium=referral&utm_campaign=footer)
*   [Partnerships](https://stackoverflow.co/partnerships/?utm_source=blog&utm_medium=referral&utm_campaign=footer)
*   [Services](https://stackoverflow.co/internal/services/?utm_source=blog&utm_medium=referral&utm_campaign=footer)
*   [Stack Overflow](https://stackoverflow.com/?utm_source=blog&utm_medium=referral&utm_campaign=footer)

### Company

*   [Leadership](https://stackoverflow.co/company/leadership/?utm_source=blog&utm_medium=referral&utm_campaign=footer)
*   [Press](https://stackoverflow.co/company/press/?utm_source=blog&utm_medium=referral&utm_campaign=footer)
*   [Careers](https://stackoverflow.co/company/careers/?utm_source=blog&utm_medium=referral&utm_campaign=footer)
*   [Social Impact](https://stackoverflow.co/company/social-impact/?utm_source=blog&utm_medium=referral&utm_campaign=footer)

### Support

*   [Contact](https://stackoverflow.com/contact/?utm_source=blog&utm_medium=referral&utm_campaign=footer)
*   [Stack Overflow help](https://stackoverflow.com/help/?utm_source=blog&utm_medium=referral&utm_campaign=footer)
*   [Stack Internal help](https://support.stackenterprise.co/support/solutions/22000023964)
*   [Terms](https://policies.stackoverflow.co/?utm_source=blog&utm_medium=referral&utm_campaign=footer)
*   [Privacy policy](https://stackoverflow.com/legal/privacy-policy/?utm_source=blog&utm_medium=referral&utm_campaign=footer)
*   [Cookie policy](https://stackoverflow.com/legal/cookie-policy/?utm_source=blog&utm_medium=referral&utm_campaign=footer)
*    Your Privacy Choices 

### Elsewhere

*   [Blog](https://stackoverflow.blog/)
*   [Dev Newsletter](https://stackoverflow.blog/newsletter/)
*   [Podcast](https://stackoverflow.blog/podcast/)
*   [Releases](https://stackoverflow.blog/releases/)
*   [Dev Survey](https://survey.stackoverflow.co/ "Annual Developer Survey")

 Site design / logo © 2026 Stack Exchange Inc. 

Light Dark Auto 

[](https://linkedin.com/company/stack-overflow/ "LinkedIn")[](https://x.com/stackoverflow/ "Twitter/X")[](https://www.threads.net/@thestackoverflow "Threads")[](https://www.instagram.com/thestackoverflow/ "Instagram")[](https://www.youtube.com/c/StackOverflowOfficial "YouTube")

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our [Cookie Policy](https://policies.stackoverflow.co/stack-overflow/cookie-policy/).

Accept all Necessary cookies only

Customize settings

![Image 3: Stack Exchange Inc.](https://cdn.cookielaw.org/logos/481fe84d-93cd-45d7-9ee5-d340809f8e77/019c52bd-74d3-742f-ae4a-8a7405f360f5/a9601065-008a-45cb-add3-73e981573e18/stackoverflow-logo.png)

## Cookie consent preference center

When you visit any of our websites, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and manage your preferences. Please note, blocking some types of cookies may impact your experience of the site and the services we are able to offer. 

[Cookie policy](https://policies.stackoverflow.co/stack-overflow/cookie-policy/)

Accept all cookies
### Manage consent preferences

#### Strictly Necessary Cookies

Always Active

These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.

#### Functional Cookies

- [x] Functional Cookies 

These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.

#### Targeting Cookies

- [x] Targeting Cookies 

These cookies are used to make advertising messages more relevant to you and may be set through our site by us or by our advertising partners. They may be used to build a profile of your interests and show you relevant advertising on our site or on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device.

#### Performance Cookies

- [x] Performance Cookies 

These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.

### Cookie List

Clear

*   - [x] checkbox label label 

Apply Cancel

Consent Leg.Interest

- [x] checkbox label label

- [x] checkbox label label

- [x] checkbox label label

Necessary cookies only Confirm my choices

[![Image 4: Powered by Onetrust](https://cdn.cookielaw.org/logos/static/powered_by_logo.svg)](https://www.onetrust.com/products/cookie-consent/)
