From b64e5a242a35cc575099d08afc67ad0c300ebb80 Mon Sep 17 00:00:00 2001 From: Tom Early Date: Sun, 11 Aug 2024 15:54:27 -0700 Subject: [PATCH] XML Connect and LastHeard times now GMT ISO 8601, e.g., 2025-08-11T15:53:22Z --- reflector/Client.cpp | 4 ++-- reflector/Peer.cpp | 4 ++-- reflector/User.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/reflector/Client.cpp b/reflector/Client.cpp index f026463..881a920 100644 --- a/reflector/Client.cpp +++ b/reflector/Client.cpp @@ -85,11 +85,11 @@ void CClient::WriteXml(std::ofstream &xmlFile) xmlFile << "\t" << m_ReflectorModule << "" << std::endl; xmlFile << "\t" << GetProtocolName() << "" << std::endl; char mbstr[100]; - if (std::strftime(mbstr, sizeof(mbstr), "%A %c", std::localtime(&m_ConnectTime))) + if (std::strftime(mbstr, sizeof(mbstr), "%FT%TZ", std::gmtime(&m_ConnectTime))) { xmlFile << "\t" << mbstr << "" << std::endl; } - if (std::strftime(mbstr, sizeof(mbstr), "%A %c", std::localtime(&m_LastHeardTime))) + if (std::strftime(mbstr, sizeof(mbstr), "%FT%TZ", std::gmtime(&m_LastHeardTime))) { xmlFile << "\t" << mbstr << "" << std::endl; } diff --git a/reflector/Peer.cpp b/reflector/Peer.cpp index 3a1638e..2333d0f 100644 --- a/reflector/Peer.cpp +++ b/reflector/Peer.cpp @@ -114,11 +114,11 @@ void CPeer::WriteXml(std::ofstream &xmlFile) xmlFile << "\t" << m_ReflectorModules << "" << std::endl; xmlFile << "\t" << GetProtocolName() << "" << std::endl; char mbstr[100]; - if (std::strftime(mbstr, sizeof(mbstr), "%A %c", std::localtime(&m_ConnectTime))) + if (std::strftime(mbstr, sizeof(mbstr), "%FT%TZ", std::gmtime(&m_ConnectTime))) { xmlFile << "\t" << mbstr << "" << std::endl; } - if (std::strftime(mbstr, sizeof(mbstr), "%A %c", std::localtime(&m_LastHeardTime))) + if (std::strftime(mbstr, sizeof(mbstr), "%FT%TZ", std::gmtime(&m_LastHeardTime))) { xmlFile << "\t" << mbstr << "" << std::endl; } diff --git a/reflector/User.cpp b/reflector/User.cpp index 2110fdc..772e96e 100644 --- a/reflector/User.cpp +++ b/reflector/User.cpp @@ -70,7 +70,7 @@ void CUser::WriteXml(std::ofstream &xmlFile) xmlFile << "\t" << m_Xlx << "" << std::endl; char mbstr[100]; - if (std::strftime(mbstr, sizeof(mbstr), "%A %c", std::localtime(&m_LastHeardTime))) + if (std::strftime(mbstr, sizeof(mbstr), "%FT%TZ", std::gmtime(&m_LastHeardTime))) { xmlFile << "\t" << mbstr << "" << std::endl; }