Trivial cleanup

This commit is contained in:
louiz’
2019-09-23 22:08:48 +02:00
parent 7c660c3f39
commit b7b54d8f0e
+1 -2
View File
@@ -3,7 +3,6 @@
#include <sstream> #include <sstream>
#include <iomanip> #include <iomanip>
#include <locale>
#include "biboumi.h" #include "biboumi.h"
@@ -12,7 +11,7 @@ namespace utils
std::string to_string(const std::chrono::system_clock::time_point::rep& time) std::string to_string(const std::chrono::system_clock::time_point::rep& time)
{ {
constexpr std::size_t stamp_size = 21; constexpr std::size_t stamp_size = 21;
const std::time_t timestamp = static_cast<std::time_t>(time); const auto timestamp = static_cast<std::time_t>(time);
char date_buf[stamp_size]; char date_buf[stamp_size];
struct tm tm; struct tm tm;
if (std::strftime(date_buf, stamp_size, "%FT%TZ", gmtime_r(&timestamp, &tm)) != stamp_size - 1) if (std::strftime(date_buf, stamp_size, "%FT%TZ", gmtime_r(&timestamp, &tm)) != stamp_size - 1)