summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-rss
diff options
context:
space:
mode:
authorBrett Porter <brett@apache.org>2009-12-08 22:31:37 +0000
committerBrett Porter <brett@apache.org>2009-12-08 22:31:37 +0000
commit4ea422a9d19e45394f442df2b6468d7aa5be8482 (patch)
tree85c8f8806b77fd44087fe29c9b2338d67d6b69da /archiva-modules/archiva-web/archiva-rss
parentebaee33d1ef27a2aefb989533fdbfb0ffd9f161b (diff)
downloadarchiva-4ea422a9d19e45394f442df2b6468d7aa5be8482.tar.gz
archiva-4ea422a9d19e45394f442df2b6468d7aa5be8482.zip
remove unnecessary dependency on commons-lang
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/MRM-1025@888603 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web/archiva-rss')
-rw-r--r--archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessor.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessor.java b/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessor.java
index 9f1525a4e..addf50dec 100644
--- a/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessor.java
+++ b/archiva-modules/archiva-web/archiva-rss/src/main/java/org/apache/archiva/rss/processor/NewArtifactsRssFeedProcessor.java
@@ -22,10 +22,11 @@ package org.apache.archiva.rss.processor;
import java.util.Calendar;
import java.util.List;
import java.util.Map;
+import java.util.TimeZone;
+import com.sun.syndication.feed.synd.SyndFeed;
import org.apache.archiva.rss.RssFeedEntry;
import org.apache.archiva.rss.RssFeedGenerator;
-import org.apache.commons.lang.time.DateUtils;
import org.apache.maven.archiva.database.ArchivaDatabaseException;
import org.apache.maven.archiva.database.ArtifactDAO;
import org.apache.maven.archiva.database.Constraint;
@@ -34,8 +35,6 @@ import org.apache.maven.archiva.model.ArchivaArtifact;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.sun.syndication.feed.synd.SyndFeed;
-
/**
* Retrieve and process all artifacts of a repository from the database and generate a rss feed.
* The artifacts will be grouped by the date when the artifacts were gathered.
@@ -65,6 +64,8 @@ public class NewArtifactsRssFeedProcessor
*/
private ArtifactDAO artifactDAO;
+ private static final TimeZone GMT_TIME_ZONE = TimeZone.getTimeZone( "GMT" );
+
/**
* Process the newly discovered artifacts in the repository. Generate feeds for new artifacts in the repository and
* new versions of artifact.
@@ -85,7 +86,7 @@ public class NewArtifactsRssFeedProcessor
private SyndFeed processNewArtifactsInRepo( String repoId ) throws ArchivaDatabaseException
{
- Calendar greaterThanThisDate = Calendar.getInstance( DateUtils.UTC_TIME_ZONE );
+ Calendar greaterThanThisDate = Calendar.getInstance( GMT_TIME_ZONE );
greaterThanThisDate.add( Calendar.DATE, -( getNumberOfDaysBeforeNow() ) );
Constraint artifactsByRepo = new ArtifactsByRepositoryConstraint( repoId, greaterThanThisDate.getTime(), "whenGathered", false );