rfc3339_date
Converts a date or datetime object into an RFC 3339 compliant string, appending a UTC designator if no timezone offset is present.
def rfc3339_date(
date: datetime.date | datetime.datetime
) - > string
Converts a date or datetime object into a string formatted according to the RFC 3339 standard, ensuring compatibility with systems requiring standardized timestamp representations.
Parameters
| Name | Type | Description |
|---|---|---|
| date | `datetime.date | datetime.datetime` |
Returns
| Type | Description |
|---|---|
string | The ISO 8601 formatted date string with a 'Z' suffix if no UTC offset is present, representing the timestamp in RFC 3339 format. |