Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 3.2
-
Fix Version/s: 3.3
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
Current implementation creates a timestamp for OpenIDE-Module-Build-Version manifest's field with hours in 'am/pm' format like:
OpenIDE-Module-Build-Version: 201007010848
when run on
LANG=C date --utc
Thu Jul 1 17:48:13 UTC 2010
I've fixed this, see
http://github.com/manandbytes/nbm-maven-plugin/commits/build-version-timestamp for details.
What was changed:
Pattern was changed to represent hours in a 24h format.
java.text.SimpleDateFormat uses an instance of java.util.Calendar initialized with a default timezone provided by java.util.TimeZone.getDefault(). Configure date formatter with UTC
time-zone explicitly to prevent possible locale-dependent side-effects.
And as a final step code to create and format timestamp was extracted to a private method createTimestamp().
Now the timestamp will be created in a 24h format and independent from the local timezone:
OpenIDE-Module-Build-Version: 201007011745
when invoked on
LANG=C date --utc
Thu Jul 1 17:45:36 UTC 2010
patch applied, thanks a lot.