> For the complete documentation index, see [llms.txt](https://docs.postgresql.tw/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.postgresql.tw/19/appendixes/datetime-appendix.md). Agents can also search and read this documentation through its [MCP server](https://docs.postgresql.tw/~gitbook/mcp).

# 附錄 B. 日期／時間支援

**目錄**

[B.1. 日期／時間輸入解讀](https://docs.postgresql.tw/19/appendixes/datetime-appendix/datetime-input-rules.md)

[B.2. 處理無效或模稜兩可的時間戳記](https://docs.postgresql.tw/19/appendixes/datetime-appendix/datetime-invalid-input.md)

[B.3. 日期／時間關鍵字](https://docs.postgresql.tw/19/appendixes/datetime-appendix/datetime-keywords.md)

[B.4. 日期／時間設定檔](https://docs.postgresql.tw/19/appendixes/datetime-appendix/datetime-config-files.md)

[B.5. POSIX 時區規格](https://docs.postgresql.tw/19/appendixes/datetime-appendix/datetime-posix-timezone-specs.md)

[B.6. 單位的歷史](https://docs.postgresql.tw/19/appendixes/datetime-appendix/datetime-units-history.md)

[B.7. 儒略日期](https://docs.postgresql.tw/19/appendixes/datetime-appendix/datetime-julian-dates.md)

PostgreSQL 使用內部啟發式剖析器支援所有日期／時間輸入。日期與時間會以 字串輸入，並拆分為不同欄位；剖析器會先判定欄位可能包含的資訊類型。每個欄位 接著會被解讀，並被指派數值、忽略或拒絕。剖析器為所有文字欄位維護內部查詢表， 其中包括月份、星期幾與時區。

本附錄說明這些查詢表的內容，並描述剖析器解碼日期與時間時所使用的步驟。

***

原文：[PostgreSQL 18.6 Documentation](https://www.postgresql.org/docs/18/datetime-appendix.html)（原文版本：18.6；核對日期：2026-09-10）


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.postgresql.tw/19/appendixes/datetime-appendix.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
