comparison 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
comparison
equal deleted inserted replaced
2474:0c57f40e2fbf 2475:8cc3ca64a534
906 throw OrthancException(ErrorCode_ParameterOutOfRange); 906 throw OrthancException(ErrorCode_ParameterOutOfRange);
907 } 907 }
908 } 908 }
909 909
910 910
911 TEST(Toolbox, Now)
912 {
913 LOG(WARNING) << "Local time: " << SystemToolbox::GetNowIsoString(false);
914 LOG(WARNING) << "Universal time: " << SystemToolbox::GetNowIsoString(true);
915
916 std::string date, time;
917 SystemToolbox::GetNowDicom(date, time, false);
918 LOG(WARNING) << "Local DICOM time: [" << date << "] [" << time << "]";
919
920 SystemToolbox::GetNowDicom(date, time, true);
921 LOG(WARNING) << "Universal DICOM time: [" << date << "] [" << time << "]";
922 }
923
924
911 925
912 #if ORTHANC_ENABLE_PUGIXML == 1 926 #if ORTHANC_ENABLE_PUGIXML == 1
913 TEST(Toolbox, Xml) 927 TEST(Toolbox, Xml)
914 { 928 {
915 Json::Value a; 929 Json::Value a;