# 日期倒计时计算器

> 实时显示距离任意时区指定日期与时间还剩或已过的天、小时、分、秒，并考虑时钟调整。

交互版本：https://www.calcopenly.com/zh/datetime/countdown-calculator
主题：日期与时间计算器

The target date and time is turned into a single instant using its time zone's UTC offset on that day, taken from the IANA time zone database, so daylight-saving changes are included. The current time is subtracted from it and the gap in seconds is split into days of 86,400 seconds, then hours, minutes and seconds. The display updates every second, and once the target has passed it counts the time since.

People count down to launches, exams, flights, holidays and deadlines set in another country. From noon UTC on 15 January 2026 to midnight UTC on 1 February 2026 is 16 days and 12 hours, or 1,425,600 seconds.

On the day clocks go forward some clock times never happen: 02:30 on 8 March 2026 in New York is read as 03:30, the time it would be after the jump. On the day clocks go back an hour happens twice, and the advanced option picks the first or second occurrence.

## 输入

- **Event name**
- **Target date**
- **Target time**
- **Time zone of the target** (选项：This device's time zone, UTC, Honolulu, Anchorage, Los Angeles, Denver, Phoenix, Chicago, Mexico City, New York, Toronto, Bogotá, Halifax, St John's, Santiago, São Paulo, Buenos Aires, Reykjavík, London, Dublin, Lisbon, Lagos, Casablanca, Paris, Berlin, Madrid, Rome, Amsterdam, Stockholm, Oslo, Johannesburg, Cairo, Athens, Helsinki, Kyiv, Istanbul, Nairobi, Moscow, Riyadh, Tehran, Dubai, Karachi, India (Kolkata), Kathmandu, Dhaka, Bangkok, Jakarta, Singapore, China (Shanghai), Hong Kong, Manila, Perth, Seoul, Tokyo, Adelaide, Brisbane, Sydney, Auckland, Chatham Islands, Kiritimati)
- **If that time happens twice (clocks going back)** (选项：Use the first occurrence, Use the second occurrence)

## 结果

- Time left — 主要结果
- Direction
- Days
- Hours
- Minutes
- Seconds
- Total hours (h)
- Total seconds (s)
- Target in UTC

## 公式

$$
\Delta t = t_{\text{target}} - t_{\text{now}},\quad t_{\text{target}} = \text{local time} - \text{UTC offset}
$$

## 计算示例

### Midnight UTC on 1 Feb 2026, from noon on 15 Jan

- Target date: 2026-02-01
- Target time: 00:00
- Time zone of the target: UTC
- **Time left: 16 d 12 h**
- **Days: 16**
- **Hours: 12**
- **Minutes: 0**
- **Seconds: 0**
- **Direction: Until the target**
- **Target in UTC: 2026-02-01T00:00:00Z**
- 核验来源：Python 3.8: datetime(2026,2,1,tzinfo=utc) − datetime(2026,1,15,12,tzinfo=utc) = 16 days 12:00:00 (test context now = 2026-01-15T12:00Z)

### New York, just after clocks spring forward

- Target date: 2026-03-08
- Target time: 03:00
- Time zone of the target: New York
- **Time left: 51 d 19 h**
- **Days: 51**
- **Hours: 19**
- **Target in UTC: 2026-03-08T07:00:00Z**
- 核验来源：Python 3.8 dateutil.tz (system tzdata 2024a): 2026-03-08 03:00 EDT = 07:00Z; minus 2026-01-15T12:00Z = 4,474,800 s

### Time skipped by the DST jump

- Target date: 2026-03-08
- Target time: 02:30
- Time zone of the target: New York
- **Time left: 51 d 19 h 30 min**
- **Days: 51**
- **Hours: 19**
- **Minutes: 30**
- **Target in UTC: 2026-03-08T07:30:00Z**
- 核验来源：Python 3.8 dateutil.tz.resolve_imaginary: 02:30 on 2026-03-08 in New York becomes 03:30 EDT = 07:30Z; minus now = 4,476,600 s

### A time already past (Tokyo New Year)

- Target date: 2026-01-01
- Target time: 00:00
- Time zone of the target: Tokyo
- **Time left: 14 d 21 h**
- **Direction: Since the target**
- **Days: 14**
- **Hours: 21**
- 核验来源：Python 3.8 dateutil.tz: 2026-01-01 00:00 JST = 2025-12-31T15:00Z, 14 days 21 hours before 2026-01-15T12:00Z

## 常见问题

### How many days are there until Christmas?

Christmas Day, 25 December, is day 359 of a common year and day 360 of a leap year, so subtract today's day of the year from that number. From 1 January 2026 it is 358 days and from 1 December it is 24 days. Set the target to 25 December at 00:00 in your own time zone to see the live count down to the second.

### Does the countdown allow for daylight saving time?

Yes. The target's UTC offset comes from the IANA database for that exact date. In 2026 US clocks go forward at 2:00 a.m. on 8 March and back on 1 November, and EU clocks change at 01:00 UTC on 29 March and 25 October. A countdown that spans one of these changes is an hour shorter or longer than the number of days times 24.

### How do I count down to an event in another time zone?

Pick the time zone the event is announced in, not your own. Midnight on 1 January 2026 in Tokyo, which is UTC+9, was 15:00 UTC on 31 December 2025, nine hours before midnight in London. The "Target in UTC" result shows the instant being counted to, so you can compare it with a time given in UTC or GMT.

### How many seconds are in a day, a week and 30 days?

A day has 86,400 seconds (24 × 60 × 60), a week 604,800 and 30 days 2,592,000. The countdown counts every day as 86,400 seconds, the same convention as POSIX (Unix) time, which leaves leap seconds out. Total hours are shown to two decimals, so 16 days and 12 hours reads as 396.00 hours.

### “日期倒计时计算器”有多准确？

准确性取决于输入值和方法的假设。十进制运算使用50位有效数字，但估算、数值方法和源数据的精度可能较低；显示时的舍入并不能消除这些限制。 已按独立来源核验的计算示例：4。 例如，“Midnight UTC on 1 Feb 2026, from noon on 15 Jan”根据Python 3.8: datetime(2026,2,1,tzinfo=utc) − datetime(2026,1,15,12,tzinfo=utc) = 16 days 12:00:00 (test context now = 2026-01-15T12:00Z)进行核验。

### 这种方法出自哪里？

IANA Time Zone Database; TC39 Temporal proposal — ZonedDateTime disambiguation ("compatible").

## 来源

- [IANA Time Zone Database](https://www.iana.org/time-zones)
- [TC39 Temporal proposal — ZonedDateTime disambiguation ("compatible")](https://tc39.es/proposal-temporal/docs/zoneddatetime.html)
