CLDR xxx
UTC offset, extended.
-07:00
at the reference instant, Mon, Jan 2 2006, 3:04:05 PM MST
The offset with a colon (-07:00) — the ISO 8601 extended form that timestamps in JSON, RFC 3339 and HTML datetime attributes want. Not portably available in classic C strftime.
| Language | Token | Caveat |
|---|---|---|
| C# custom format | zzz | zz gives hours only (-07), z unpadded (-7). Prefer K when round-tripping: Z for UTC, empty for unspecified. |
| CLDR / ICU pattern | xxx | ZZZZZ and XXX are equivalents that print Z at UTC; xxx prints +00:00. |
| Go time layout | -07:00 | |
| Java DateTimeFormatter | xxx | Always +00:00 at UTC; XXX is identical except it prints the letter Z for zero offset. |
| JavaScript Intl.DateTimeFormat | timeZoneName: "longOffset" | Prints GMT-07:00, not bare -07:00 — the GMT prefix is not removable. shortOffset gives GMT-7. |
| Moment.js format | Z | |
| PHP date() | P | p (PHP 8.0+) is identical but prints Z instead of +00:00. |
| Python strftime | %:z | Added in Python 3.12; earlier versions need manual slicing. |
| Ruby strftime | %:z | %::z adds seconds to the offset. |
| Rust chrono | %:z | %::z adds seconds; %:::z drops minutes. |
Definition anchored to ISO 8601 (via Wikipedia overview).