<tstamp>

[This is preliminary documentation and subject to change.]

Sets properties with the current date and time.

By default the <tstamp> task displays the current date and time and sets the following properties:

To set an additional property with a custom date/time use the property and pattern attributes. To set a number of additional properties 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.

Parameters

Attribute Type Description Required
pattern string The date/time pattern to be used. False
property string The property to receive the date/time string in the given pattern. False
failonerror bool Determines if task failure stops the build, or is just reported. The default is true. False
if bool If true then the task will be executed; otherwise, skipped. The default is true. False
unless bool Opposite of if. If false then the task will be executed; otherwise, skipped. The default is false. False
verbose bool Determines whether the task should report detailed build log messages. The default is false. False

Nested Elements:

<formatter>

Contains a collection of Formatter elements.

</formatter>

Examples

Requirements

Assembly: NAnt.Core (0.85.1793.0)