This page is intended to evolve into a collection of clock format strings for producing the different formats used in different RFCs.
LEG RFC5322, 3.3 Date and Time Specification
There are multiple ways for formatting date and time in the Internet Message Format. The current (2018) canonical way of doing it seems to be the following:
clock format [clock seconds] -format "%d %b %Y %T %z"
If you want omit information about the current timezone the UTC timezone with a minus sign has to be used. This might be the case, if you have a (worldwide distributed) webmail system where users from timezones other then the server send Email.
clock format [clock seconds] -format "%d %b %Y %T -0000" -timezone GMT
LEG RFC7231, 7.1.1.1Date/Time Formats
Date/time in http headers shall be formatted in "Internet Message Format" - "IMF-fixdate", RFC7231 references RFC5322, but restricts the format in the following way:
Date/time must always be in UTC, not in local time and the timezone indicator must be 'GMT'.
clock format [clock seconds] -format "%a, %d %b %Y %T %Z" -timezone GMT
LEG Wikipedia on ISO8601 , RFC3339, 5.6. Internet Date/Time Format
UTC:
clock format [clock seconds] -format %Y-%m-%dT%H:%M:%SZ -timezone GMT
Todo: Add format with time zone notation