# 时钟时间计算

时钟时间是指通常格式为冒号（hh:mm）的时间点。

### 从时钟时间增加或减去时间

<pre><code><strong>现在 + 3 小时 15 分钟                | 6:26 pm
</strong>9:45 am - 15 小时 10 分钟 | 昨天 6:35 pm
16:00 + 3 小时 12 分钟             | 7:12 pm
</code></pre>

{% hint style="info" %}
时钟时间计算会考虑夏令时，在夏令时切换的日子里，您可能会遇到意料之外的结果。
{% endhint %}

### 查找两个时钟时间之间的间隔

```
7:30 到 20:45 | 3 小时 15 分钟
4pm 到 3am    | 11 小时
```

### 使用减号 (-) 运算符处理时钟时间时的歧义性

遗憾的是，当涉及到时钟时间时，减号运算符可能会产生歧义。

我们中的许多人使用它来表示从**第一个时钟时间**到**第二个时钟时间**（即未来的时间）的 ***时间范围***：

`5pm - 9pm` (从 5pm 到 9pm)

但我们中的许多人也使用它来表达从第一个时钟时间减去第二个时钟时间 ***的减法***：

`5pm - 3pm` (5pm 减去 3pm)

Soulver 会尽力根据您选择的具体时钟时间来解释您的意图：

<pre><code>/// 获取今天这两个时钟时间之间的时间量
5pm - 7pm         | 2 小时
<strong>5pm - 2pm | 2 小时
</strong>
// 这被解释为今天下午 4 点回溯到今天早晨的 3 点
4pm - 3am         | 13 小时

/// 这被解释为今天早晨的 3 点到今天下午 4 点
3am - 4pm         | 13 小时
</code></pre>

为获得最可预测的结果，请使用 [查找两个时钟时间之间的间隔。](#finding-the-interval-between-two-clock-times) 中描述的 "到" 运算符。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.soulver.app/zh/yu-fa-can-kao/time/clock-time-calculations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
