diff UnitTestsSources/UnitTestsMain.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 83b8b6743531
line wrap: on
line diff
--- a/UnitTestsSources/UnitTestsMain.cpp	Thu Feb 08 11:51:41 2018 +0100
+++ b/UnitTestsSources/UnitTestsMain.cpp	Mon Feb 19 16:55:05 2018 +0100
@@ -908,6 +908,20 @@
 }
 
 
+TEST(Toolbox, Now)
+{
+  LOG(WARNING) << "Local time: " << SystemToolbox::GetNowIsoString(false);
+  LOG(WARNING) << "Universal time: " << SystemToolbox::GetNowIsoString(true);
+
+  std::string date, time;
+  SystemToolbox::GetNowDicom(date, time, false);
+  LOG(WARNING) << "Local DICOM time: [" << date << "] [" << time << "]";
+
+  SystemToolbox::GetNowDicom(date, time, true);
+  LOG(WARNING) << "Universal DICOM time: [" << date << "] [" << time << "]";
+}
+
+
 
 #if ORTHANC_ENABLE_PUGIXML == 1
 TEST(Toolbox, Xml)