diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/asn1/asn1_time.cpp | 18 | ||||
-rw-r--r-- | src/lib/utils/calendar.cpp | 14 |
2 files changed, 17 insertions, 15 deletions
diff --git a/src/lib/asn1/asn1_time.cpp b/src/lib/asn1/asn1_time.cpp index daa0c4e7d..aca7fdca0 100644 --- a/src/lib/asn1/asn1_time.cpp +++ b/src/lib/asn1/asn1_time.cpp @@ -97,14 +97,16 @@ std::string X509_Time::readable_string() const // desired format: "%04d/%02d/%02d %02d:%02d:%02d UTC" std::stringstream output; - { - using namespace std; - output << setfill('0') - << setw(4) << m_year << "/" << setw(2) << m_month << "/" << setw(2) << m_day - << " " - << setw(2) << m_hour << ":" << setw(2) << m_minute << ":" << setw(2) << m_second - << " UTC"; - } + output << std::setfill('0') + << std::setw(4) << m_year << "/" + << std::setw(2) << m_month << "/" + << std::setw(2) << m_day + << " " + << std::setw(2) << m_hour << ":" + << std::setw(2) << m_minute << ":" + << std::setw(2) << m_second + << " UTC"; + return output.str(); } diff --git a/src/lib/utils/calendar.cpp b/src/lib/utils/calendar.cpp index d39e52823..e902e411d 100644 --- a/src/lib/utils/calendar.cpp +++ b/src/lib/utils/calendar.cpp @@ -92,13 +92,13 @@ std::string calendar_point::to_string() const { // desired format: <YYYY>-<MM>-<dd>T<HH>:<mm>:<ss> std::stringstream output; - { - using namespace std; - output << setfill('0') - << setw(4) << get_year() << "-" << setw(2) << get_month() << "-" << setw(2) << get_day() - << "T" - << setw(2) << get_hour() << ":" << setw(2) << get_minutes() << ":" << setw(2) << get_seconds(); - } + output << std::setfill('0') + << std::setw(4) << get_year() << "-" + << std::setw(2) << get_month() << "-" + << std::setw(2) << get_day() << "T" + << std::setw(2) << get_hour() << ":" + << std::setw(2) << get_minutes() << ":" + << std::setw(2) << get_seconds(); return output.str(); } |