HeoLab
ToolsBlogAboutContact
HeoLab

Free developer tools with AI enhancement. Built for developers who ship.

Tools

  • JSON Formatter
  • JWT Decoder
  • Base64 Encoder
  • Timestamp Converter
  • Regex Tester
  • All Tools →

Resources

  • Blog
  • What is JSON?
  • JWT Deep Dive
  • Base64 Explained

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 HeoLab. All rights reserved.

Tools work in your browser. Zero data retention.

HomeBlogISO 8601 Date Format: The Standard Every Developer Should Know
Table of Contents▾
  • Table of Contents
  • Why ISO 8601?
  • Date and Time Formats
  • Timezone Notation
  • Durations
  • Common Mistakes
guides#timestamp#iso8601#datetime

ISO 8601 Date Format: The Standard Every Developer Should Know

A practical guide to the ISO 8601 date/time standard — formats, timezone notation, durations, and how to use it in your APIs.

Trong Ngo
February 22, 2026
1 min read

Table of Contents

  • Why ISO 8601?
  • Date and Time Formats
  • Timezone Notation
  • Durations
  • Common Mistakes

Why ISO 8601?

Without a standard, dates are ambiguous: is 02/03/2025 February 3 or March 2?

ISO 8601 eliminates ambiguity with a globally unambiguous, sortable format.

Date and Time Formats

Date:     2025-02-22
Time:     14:30:00
DateTime: 2025-02-22T14:30:00
With ms:  2025-02-22T14:30:00.123

Timezone Notation

UTC (Zulu):  2025-02-22T14:30:00Z
Offset +8:   2025-02-22T22:30:00+08:00
Offset -5:   2025-02-22T09:30:00-05:00

Always prefer Z (UTC) in APIs.

Durations

ISO 8601 durations follow the pattern P[n]Y[n]M[n]DT[n]H[n]M[n]S:

P1Y2M3DT4H5M6S  -> 1 year, 2 months, 3 days, 4 hours, 5 minutes, 6 seconds
P30D            -> 30 days
PT15M           -> 15 minutes

Common Mistakes

WrongRightReason
2025/02/222025-02-22Slashes not ISO 8601
2025-2-52025-02-05Must zero-pad
+0800+08:00Colon required

ISO 8601 strings sort correctly as text, making them ideal for DB indexes and API responses.

Try These Tools

Unix Timestamp Converter

Convert Unix timestamps to human-readable dates and vice versa. Supports all major timezone formats.

Related Articles

JavaScript Date API Cheatsheet for Developers

2 min read

Date and Time Best Practices for APIs

1 min read

Handling Timezones in Web Applications

2 min read

Back to Blog

Table of Contents

  • Table of Contents
  • Why ISO 8601?
  • Date and Time Formats
  • Timezone Notation
  • Durations
  • Common Mistakes

Related Articles

JavaScript Date API Cheatsheet for Developers

2 min read

Date and Time Best Practices for APIs

1 min read

Handling Timezones in Web Applications

2 min read