summaryrefslogtreecommitdiff
path: root/src/message/builder/date.cpp
blob: d92b4db740c34dc726f2681caa7be23b99246c33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "date.hpp"

namespace smtp::message::builder
{
    std::string Date::Get() const
    {
        std::string result;

        if( mBase )
        {
            result = mBase->Get();
        }
        auto current_date = time(0);
        std::string current_date_as_string = ctime(&current_date);

        result += "Date: " + current_date_as_string + "\r\n";
        return result;
    }
}