# 时间函数
> 使用这些函数处理时间值。
- 本页规范地址：https://hugozh.cn/functions/time/
- 最近更新：2026-10-02
- 站点：Hugo 中文文档（https://hugozh.cn/）· 社区维护的非官方中文翻译

## 本章页面
- [AsTime](https://hugozh.cn/functions/time/astime/)：把日期/时间值的给定字符串表示返回为 time.Time 值。（Markdown：https://hugozh.cn/functions/time/astime/index.md）
- [Duration](https://hugozh.cn/functions/time/duration/)：使用给定的时间单位与数值返回 time.Duration 值。（Markdown：https://hugozh.cn/functions/time/duration/index.md）
- [Format](https://hugozh.cn/functions/time/format/)：把给定日期/时间返回为格式化并本地化后的字符串。（Markdown：https://hugozh.cn/functions/time/format/index.md）
- [In](https://hugozh.cn/functions/time/in/)：返回给定日期/时间在指定 IANA 时区中的表示。（Markdown：https://hugozh.cn/functions/time/in/index.md）
- [Now](https://hugozh.cn/functions/time/now/)：返回当前本地时间。（Markdown：https://hugozh.cn/functions/time/now/index.md）
- [ParseDuration](https://hugozh.cn/functions/time/parseduration/)：解析给定的时长字符串，返回 time.Duration 值。（Markdown：https://hugozh.cn/functions/time/parseduration/index.md）

---
