<tstamp>Sets properties with the current date and time.
By default, tstamp displays the current date and time and sets the following properties:
- tstamp.date to yyyyMMdd
- tstamp.time to HHmm
- tstamp.now using the default DateTime.ToString() method
To set an additional property with a custom date/time, use the property and pattern attributes. To set a number of additional properties, all with the exact same date and time, use the formatter nested element (see example).The date and time string displayed by the tstamp task uses the computer's default long date and time string format. You might consider setting these to the ISO 8601 standard for date and time notation.
| Attribute | Description | Required |
|---|---|---|
| property | The property to receive the date/time string in the given pattern. | False |
| pattern | The date/time pattern to be used. | False |
| failonerror | Determines whether task failure stops the build or is just reported. Default is "true." | False |
| verbose | Task reports detailed build log messages. Default is "false." | False |
| if | If true then the task will be executed; otherwise skipped. Default is "true." | False |
| unless | Opposite of if. If false then the task will be executed; otherwise skipped. Default is "false." | False |
Example
<tstamp property="build.date" pattern="yyyyMMdd" verbose="true"/>