Skip to content

Commit 7423aa7

Browse files
committed
TPC: Avoid using deprecated fmt::localtime
1 parent c1b57b1 commit 7423aa7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Detectors/TPC/base/src/CDBInterface.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,14 +722,16 @@ void CDBStorage::printObjectSummary(std::string_view name, CDBType const type, M
722722
{
723723
std::time_t tstart(start / 1000);
724724
std::time_t tend(end / 1000);
725+
std::tm ttstart = *std::localtime(&tstart);
726+
std::tm ttend = *std::localtime(&tend);
725727
auto tstartms = start % 1000;
726728
auto tendms = end % 1000;
727729

728730
std::string message = fmt::format("Writing object of type '{}'\n", demangle(name)) +
729731
fmt::format(" to storage '{}'\n", mCCDB.getURL()) +
730732
fmt::format(" into path '{}'\n", CDBTypeMap.at(type)) +
731733
fmt::format(" with validity [{}, {}] :", start, end) +
732-
fmt::format(" [{:%d.%m.%Y %H:%M:%S}.{:03d}, {:%d.%m.%Y %H:%M:%S}.{:03d}]\n", fmt::localtime(tstart), tstartms, fmt::localtime(tend), tendms) +
734+
fmt::format(" [{:%d.%m.%Y %H:%M:%S}.{:03d}, {:%d.%m.%Y %H:%M:%S}.{:03d}]\n", ttstart, tstartms, ttend, tendms) +
733735
std::string(" Meta data:\n");
734736

735737
for (const auto& [key, value] : metadata) {

0 commit comments

Comments
 (0)