PHP Date Format Converter (date() Constants)
PHP's `date()` function accepts format constants like DATE_COOKIE (`Thursday, 13-Aug-2026 14:30:00 UTC`), DATE_RFC850 (`Thursday, 13-Aug-26 14:30:00 UTC`) and DATE_RFC1036 (`Thu, 13 Aug 26 14:30:00 +0000`) for cookies, legacy feeds and mail headers.
This converter renders your date-time in each PHP constant form so you can predict `date(DATE_COOKIE)` output when setting cookies or generating headers.
PHP Date Format Converter (date() Constants) Quick Reference
| Format | Pattern / Description | Example 1 | Example 2 |
|---|---|---|---|
| PHP DATE_COOKIE | Cookie format | Thu, 13-Aug-2026 14:30:00 GMT | Thu, 01-Jan-2026 00:00:00 GMT |
| PHP RFC 850 | EEEE, dd-MMM-yy HH:mm:ss XX | Thursday, 13-Aug-26 14:30:00 GMT | Thursday, 01-Jan-26 00:00:00 GMT |
| PHP RFC 1036 | EEE, dd MMM yy HH:mm:ss XX | Thu, 13 Aug 26 14:30:00 +0000 | Thu, 01 Jan 26 00:00:00 +0000 |
* Examples are rendered in UTC for the fixed sample instants above.
When to Use PHP Date Format (date() Constants)
Cookie generation in PHP
`setcookie` with `date(DATE_COOKIE)` — preview the exact expiry string browsers will parse.
Legacy feed compatibility
Old RSS/Atom parsers expect RFC 850/1036 dates. Generate the legacy forms for maximum compatibility.
Mail header formatting
PHP mail headers historically used RFC 1036. Verify header strings before sending.
Frequently Asked Questions
What does PHP DATE_COOKIE output?
`DATE_COOKIE` = `l, d-M-Y H:i:s T`, e.g. Thursday, 13-Aug-2026 14:30:00 UTC — the format Netscape cookies use.
What is the difference between DATE_RFC850 and DATE_RFC1036?
`DATE_RFC850` = `l, d-M-y H:i:s T` (full weekday, 2-digit year, zone name); `DATE_RFC1036` = `D, d M y H:i:s O` (abbreviated weekday, numeric offset).
What is the PHP date format for ISO 8601?
`DATE_ISO8601` = `Y-m-dTH:i:sO` (e.g. `2026-08-13T14:30:00+00:00`). Note `c` (ISO 8601) differs slightly — it includes the offset as `+00:00` rather than `+0000` in some PHP versions.
What timezone does date() use?
`date()` uses the default timezone set via `date_default_timezone_set()` or `ini("date.timezone")`. For UTC output, call `gmdate()` instead.
Related Time Format Converters
All Format Guides
Need to Convert Between All Formats?
Use the main Time Format Converter for instant conversion across 100+ formats — epoch, ISO 8601, RFC 3339, SQL datetime, military time and more in one click.
Open Time Format Converter