Format the instance as ISO 8601.
(self)
| 393 | return self._to_string("cookie", locale="en") |
| 394 | |
| 395 | def to_iso8601_string(self) -> str: |
| 396 | """ |
| 397 | Format the instance as ISO 8601. |
| 398 | """ |
| 399 | string = self._to_string("iso8601") |
| 400 | |
| 401 | if self.tz and self.tz.name == "UTC": |
| 402 | string = string.replace("+00:00", "Z") |
| 403 | |
| 404 | return string |
| 405 | |
| 406 | def to_rfc822_string(self) -> str: |
| 407 | """ |