MNBMODULE-84Generate timestamp using 24h date format
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
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
Signed-off-by: Mykola Nikishov <mn@mn.com.ua>