Unix Timestamp to RFC 2822 Converter

RFC 2822 is the date format used in email headers and older HTTP responses (e.g. `Thu, 31 Jan 2024 12:00:00 +0000`). When generating Date headers for SMTP or HTTP, this is what you need.

Example: 1706745600

Unix (seconds)1706745600
Unix (milliseconds)1706745600000
ISO 8601 (UTC)2024-02-01T00:00:00Z
RFC 2822Thu, 01 Feb 2024 00:00:00 GMT
Human ReadableFebruary 1, 2024 12:00:00 AM UTC

Common Pitfall

Note: RFC 2822 requires a 4-digit year and a numeric timezone offset (`+0000`, not `UTC`). Some libraries default to abbreviated zone names - that's RFC 822, the older spec. Stick to numeric offsets for maximum compatibility.

Code Examples

Python

from email.utils import format_datetime
from datetime import datetime, timezone
format_datetime(datetime.fromtimestamp(1706745600, tz=timezone.utc))

JavaScript

new Date(1706745600 * 1000).toUTCString()

PHP

echo date(DATE_RFC2822, 1706745600);

Java

DateTimeFormatter.RFC_1123_DATE_TIME.format(
    Instant.ofEpochSecond(1706745600L).atZone(ZoneOffset.UTC))

Go

time.Unix(1706745600, 0).UTC().Format(time.RFC1123Z)

Related Conversions

Need the full converter? Open the Timestamp Converter →