Mercurial > hg > orthanc
changeset 4247:112951171852
comments
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 13 Oct 2020 10:46:05 +0200 |
parents | 6c3721ff284c |
children | 38b24aa98ed3 |
files | OrthancFramework/Sources/HttpServer/IWebDavBucket.cpp |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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");