# 日期格式设置

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com.cn/help/idea/llms.txt).

> **TL;DR**
> `文件 | 设置 | 外观与行为 | 系统设置 | 日期格式`  适用于 Windows 和 Linux
>
>
>
> `%instance% | 设置 | 外观和行为 | 系统设置 | 日期格式`  适用于 macOS
>
>
>
> `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) !["设置"图标](https://resources.jetbrains.com.cn/help/img/idea/2026.3/app.expui.general.settings.svg)

配置 IntelliJ IDEA 应如何在 UI 的各个地方格式化日期和时间戳，例如，在   Git   工具窗口日志中。

![日期格式设置页面](https://resources.jetbrains.com.cn/help/img/idea/2026.3/settings_date_formats.png)

重写系统日期和时间格式设置方式。
: 手动指定日期和时间戳的格式。 默认情况下，IntelliJ IDEA 使用系统设置。 请根据   日期格式  中的 [日期和时间模式语法](https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html)进行设置。 请选择您要显示时间为 24 小时制还是 12 小时制。

使用美观的格式设置
: 对于最近的日期，请将绝对的数字日期和时间戳替换为相对的，如   10 分钟前  、   今天  和   昨天  。

