Stream manipulator class which serializes Time objects in RFC 1123 format (Also known as HTTP Date format). The serialization is independent from the locale and ready to be used in HTTP Headers. Example: Wed, 15 Nov 1995 04:58:08 GMT See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html section 14.18. See https://www.ietf.org/rfc/rfc1123.txt section 5.2.14
| 97 | // section 14.18. |
| 98 | // See https://www.ietf.org/rfc/rfc1123.txt section 5.2.14 |
| 99 | class RFC1123 |
| 100 | { |
| 101 | public: |
| 102 | explicit RFC1123(const Time& _time) : time(_time) {} |
| 103 | |
| 104 | private: |
| 105 | friend std::ostream& operator<<( |
| 106 | std::ostream& stream, |
| 107 | const RFC1123& formatter); |
| 108 | |
| 109 | const Time time; |
| 110 | }; |
| 111 | |
| 112 | |
| 113 | std::ostream& operator<<(std::ostream& stream, const RFC1123& formatter); |