Searchin for recent modified files with WebDAV

I try to get (all) recent modified files via WebDAV:

curl -X SEARCH https://${SERVER}/remote.php/dav -u ${USER}:${PW} $I \
  -H "content-Type: text/xml" \
  --data "<?xml version=\"1.0\"?>
 <d:searchrequest xmlns:d=\"DAV:\" xmlns:oc=\"\">
              <d:literal>Tue, 1 Jun 00:00:00 GMT 2021</d:literal>
</d:searchrequest>" \
  | xmllint --format -

(for speed reasons is depth here only 1)

How do I get the where part correct?

  • with <d:gte> I get all files, without restriction to the date
  • with <d:lt> I get an empty result