# HG changeset patch # User Sebastien Jodogne # Date 1602578765 -7200 # Node ID 112951171852e09f34e215a796fbb0ac4ad50e0f # Parent 6c3721ff284cd1f80ce7a121833620b70c4de586 comments diff -r 6c3721ff284c -r 112951171852 OrthancFramework/Sources/HttpServer/IWebDavBucket.cpp --- a/OrthancFramework/Sources/HttpServer/IWebDavBucket.cpp Tue Oct 13 10:39:47 2020 +0200 +++ b/OrthancFramework/Sources/HttpServer/IWebDavBucket.cpp Tue Oct 13 10:46:05 2020 +0200 @@ -124,10 +124,12 @@ pugi::xml_node prop = propstat.append_child("D:prop"); prop.append_child("D:displayname").append_child(pugi::node_pcdata).set_value(displayName.c_str()); - // IMPORTANT: The "Z" suffix is mandatory on Windows >= 7 (it indicates UTC) + // IMPORTANT: Adding the "Z" suffix is mandatory on Windows >= 7 (it indicates UTC) + assert(!creationTime.is_special()); s = boost::posix_time::to_iso_extended_string(creationTime) + "Z"; prop.append_child("D:creationdate").append_child(pugi::node_pcdata).set_value(s.c_str()); + assert(!modificationTime.is_special()); s = boost::posix_time::to_iso_extended_string(modificationTime) + "Z"; prop.append_child("D:getlastmodified").append_child(pugi::node_pcdata).set_value(s.c_str()); @@ -245,7 +247,9 @@ std::string href; Toolbox::UriEncode(href, AddTrailingSlash(parentPath)); - FormatInternal(self, href, folder, GetNow(), GetNow()); + + boost::posix_time::ptime now = GetNow(); + FormatInternal(self, href, folder, now, now); pugi::xml_node prop = self.first_element_by_path("D:propstat/D:prop"); prop.append_child("D:resourcetype").append_child("D:collection");