You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Anders Forsell (JIRA)" <ji...@apache.org> on 2015/08/24 07:11:45 UTC
[jira] [Created] (MNG-5877) maven-aether-provider does not always
generate snapshot versions using Gregorian calendar year
Anders Forsell created MNG-5877:
-----------------------------------
Summary: maven-aether-provider does not always generate snapshot versions using Gregorian calendar year
Key: MNG-5877
URL: https://issues.apache.org/jira/browse/MNG-5877
Project: Maven
Issue Type: Bug
Reporter: Anders Forsell
I am using the maven-aether-provider in my software and have an issue when Thailand users are publishing their snapshot versions get the Buddhist calendar year (offset of 543 years).
In RemoteSnapShotMetaData.java
``` DateFormat utcDateFormatter = new SimpleDateFormat( "yyyyMMdd.HHmmss" );
utcDateFormatter.setTimeZone( TimeZone.getTimeZone( "UTC" ) );
snapshot = new Snapshot();
snapshot.setBuildNumber( getBuildNumber( recessive ) + 1 );
snapshot.setTimestamp( utcDateFormatter.format( new Date() ) );```
The fix should be to explicitly set the calendar to be Gregorian:
```
utcDateFormatter.setCalendar(new GregorianCalendar());
```
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)