properties

properties

Getting Time And Date Values In Phing

Friday, June 10, 2011 - 17:43

The tstamp task in Phing can be used to generate a timestamp that can be used anywhere within the current project. The default behavior of tstamp is to create the properties DSTAMP, TSTAMP and TODAY, which contain time and date values. All you need to do is include the tstamp XML tag in your project somewhere.

1
<tstamp />

The properties DSTAMP, TSTAMP and TODAY use the PHP strftime() function as a basis for formatting the time. The following table shows the value of each property.

Category: 

Built In Properties In Phing

Friday, January 9, 2009 - 10:53

Aside from assigning and using your own properties Phing also comes with a set of built in properties that can be used to find out all sorts of information regarding the system that Phing is run on.

As an example, lets say you wanted to found out the operating system that phing is being run on. In this case you would use the variable host.os, which on a Windows XP system would print out WINNT.

Category: