Mercurial > hg > orthanc
diff OrthancServer/OrthancRestApi/OrthancRestSystem.cpp @ 2475:8cc3ca64a534
Orthanc now uses UTC (universal time) instead of local time in its database
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 19 Feb 2018 16:55:05 +0100 |
parents | 878b59270859 |
children | 3372c5255333 |
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi/OrthancRestSystem.cpp Thu Feb 08 11:51:41 2018 +0100 +++ b/OrthancServer/OrthancRestApi/OrthancRestSystem.cpp Mon Feb 19 16:55:05 2018 +0100 @@ -131,9 +131,10 @@ call.GetOutput().AnswerBuffer(result, "text/plain"); } + template <bool UTC> static void GetNowIsoString(RestApiGetCall& call) { - call.GetOutput().AnswerBuffer(SystemToolbox::GetNowIsoString(), "text/plain"); + call.GetOutput().AnswerBuffer(SystemToolbox::GetNowIsoString(UTC), "text/plain"); } @@ -274,7 +275,8 @@ Register("/statistics", GetStatistics); Register("/tools/generate-uid", GenerateUid); Register("/tools/execute-script", ExecuteScript); - Register("/tools/now", GetNowIsoString); + Register("/tools/now", GetNowIsoString<true>); + Register("/tools/now-local", GetNowIsoString<false>); Register("/tools/dicom-conformance", GetDicomConformanceStatement); Register("/tools/default-encoding", GetDefaultEncoding); Register("/tools/default-encoding", SetDefaultEncoding);