aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-webdav/src/main
diff options
context:
space:
mode:
authorMartin Schreier <martin_s@apache.org>2022-01-05 18:52:33 +0100
committerMartin Schreier <martin_s@apache.org>2022-01-05 18:52:33 +0100
commit8c70e270b30ca79c702c576f8e9e0273a66f583c (patch)
treecd5afec90e51f8e382b76e49af13219edaf7f5b5 /archiva-modules/archiva-web/archiva-webdav/src/main
parent31869b91d19f50f26052128d4a4afe9a2fb47970 (diff)
downloadarchiva-8c70e270b30ca79c702c576f8e9e0273a66f583c.tar.gz
archiva-8c70e270b30ca79c702c576f8e9e0273a66f583c.zip
Removing joda-time dependency
Diffstat (limited to 'archiva-modules/archiva-web/archiva-webdav/src/main')
-rw-r--r--archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaVirtualDavResource.java17
1 files changed, 10 insertions, 7 deletions
diff --git a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaVirtualDavResource.java b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaVirtualDavResource.java
index ca996f526..19556f9f5 100644
--- a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaVirtualDavResource.java
+++ b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/ArchivaVirtualDavResource.java
@@ -43,11 +43,13 @@ import org.apache.jackrabbit.webdav.property.DavPropertyNameSet;
import org.apache.jackrabbit.webdav.property.DavPropertySet;
import org.apache.jackrabbit.webdav.property.DefaultDavProperty;
import org.apache.jackrabbit.webdav.property.ResourceType;
-import org.joda.time.DateTime;
-import org.joda.time.format.DateTimeFormatter;
-import org.joda.time.format.ISODateTimeFormat;
-import java.util.*;
+import java.time.Instant;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Objects;
import java.util.stream.Collectors;
/**
@@ -351,9 +353,10 @@ public class ArchivaVirtualDavResource
}
// Need to get the ISO8601 date for properties
- DateTime dt = new DateTime( 0 );
- DateTimeFormatter fmt = ISODateTimeFormat.dateTime();
- String modifiedDate = fmt.print( dt );
+ // DateTime dt = new DateTime( 0 );
+ // DateTimeFormatter fmt = ISODateTimeFormat.dateTime();
+ // String modifiedDate = fmt.print( dt );
+ String modifiedDate = LocalDateTime.now( ).format( DateTimeFormatter.ISO_OFFSET_DATE_TIME );
properties.add( new DefaultDavProperty<>( DavPropertyName.GETLASTMODIFIED, modifiedDate ) );