[MNG-5907] org.apache.maven.repository.internal.RemoteSnapshotMetadataTest fails starting at midnight

This commit is contained in:
Michael Osipov 2015-10-10 15:50:22 +02:00
parent b711de57dc
commit 316298e529
2 changed files with 7 additions and 6 deletions

View File

@ -41,9 +41,9 @@ import org.eclipse.aether.artifact.Artifact;
final class RemoteSnapshotMetadata final class RemoteSnapshotMetadata
extends MavenSnapshotMetadata extends MavenSnapshotMetadata
{ {
private static final String DEFAULT_SNAPSHOT_TIMESTAMP_FORMAT = "yyyyMMdd.HHmmss"; public static final String DEFAULT_SNAPSHOT_TIMESTAMP_FORMAT = "yyyyMMdd.HHmmss";
private static final TimeZone DEFAULT_SNAPSHOT_TIME_ZONE = TimeZone.getTimeZone( "Etc/UTC" ); public static final TimeZone DEFAULT_SNAPSHOT_TIME_ZONE = TimeZone.getTimeZone( "Etc/UTC" );
private final Map<String, SnapshotVersion> versions = new LinkedHashMap<>(); private final Map<String, SnapshotVersion> versions = new LinkedHashMap<>();

View File

@ -56,6 +56,7 @@ public class RemoteSnapshotMetadataTest
{ {
SimpleDateFormat df = new SimpleDateFormat( "yyyyMMdd" ); SimpleDateFormat df = new SimpleDateFormat( "yyyyMMdd" );
df.setCalendar( new GregorianCalendar() ); df.setCalendar( new GregorianCalendar() );
df.setTimeZone( RemoteSnapshotMetadata.DEFAULT_SNAPSHOT_TIME_ZONE );
return df.format( new Date() ); return df.format( new Date() );
} }