The revision parameter as per the documentation is defined as follows:
-r revspecifies one or more project checkpoints to compare. rev can be a valid checkpoint number or label. To compare two specified revisions of the project, use the -r option twice. If you only use the -r option once, the working project (or last checkpoint on a build project’s branch) is compared to the specified project checkpoint. If you do not use this option at all, the working project (or build project checkpoint) is compared to the last checkpoint (or last checkpoint on the build project’s branch). The -r option when used with this command can also take the “asof:” identifier with a date, to return the project configuration as of a specific date. For example, -r asof:”April 28, 2014 3:33:45 AM GMT-05:00″.It is possible to specify the branch with the identifier, for example -r asof:”April 28, 2014 3:33:45 AM GMT-05:00″@1.3.1It is possible to specify the development path with the identifier using the form asof:date:@:devpath, for example -r asof:”April 28, 2014 3:33:45 AM GMT-05:00″@:Release2The following are additional forms may be displayed for configuration paths, and are represented here for information purposes:asof:ts=timestamp.number asof:ts=timestamp.number@branch asof:ts=timestamp.number@:devpath
Integrity Lifecycle Manager Help (ptc.com)
To specify the date string, we need to use a specify date time format from Date class. As per the description mentioned above, the date format shall be “MMMM d, yyyy h:mm:ss a ‘GMT’XXX”
import java.util.Locale
import java.util.Date
import java.text.SimpleDateFormat
Date currentDate=new Date (22,2,2,13,45,45)
SimpleDateFormat dateFormat=new SimpleDateFormat("MMMM d, yyyy h:mm:ss a 'GMT'XXX",Locale.UK)
String dateString=dateFormat.format(currentDate)
assert dateString=="March 2, 1922 1:45:45 PM GMT+01:00"
Important Hint:
- SimpleDateFormat with a specified Locale is important, otherwise the dateformat output would be different in different region. (Not only the time zone, but also the language).
- The hour support are 1-12 not 0-11. (h shall be used)