fix build on older c++

This commit is contained in:
Isaac Connor 2021-12-16 17:02:20 -05:00
parent c081637036
commit 1bc0e1820e
1 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ std::string SystemTimePointToString(SystemTimePoint tp) {
std::string timeString;
timeString.reserve(64);
char *timePtr = timeString.data();
char *timePtr = &*(timeString.begin());
tm tp_tm = {};
timePtr += strftime(timePtr, timeString.capacity(), "%x %H:%M:%S", localtime_r(&tp_sec, &tp_tm));
snprintf(timePtr, timeString.capacity() - (timePtr - timeString.data()), ".%06" PRIi64, static_cast<int64_t>(now_frac.count()));
@ -44,7 +44,7 @@ std::string TimePointToString(TimePoint tp) {
std::string timeString;
timeString.reserve(64);
char *timePtr = timeString.data();
char *timePtr = &*(timeString.begin());
tm tp_tm = {};
timePtr += strftime(timePtr, timeString.capacity(), "%x %H:%M:%S", localtime_r(&tp_sec, &tp_tm));
snprintf(timePtr, timeString.capacity() - (timePtr - timeString.data()), ".%06" PRIi64, static_cast<int64_t>(now_frac.count()));