*Time* Ticking away… by Michel Filion
This is a neat trick for automatically setting a date or timestamp property to the current time. I learned it while perusing the ATG Repository Guide.
A repository item can use properties whose values are dates or timestamps, with the value set to the current date or time, using the java.util.Date, java.sql.Date, or java.sql.Timestamp classes. You can have a property whose value is set to the current time or date at the moment a repository item is created. You can do this by setting the feature descriptor attribute useNowForDefault. For example:
[xml]<property name="creationDate" data-type="timestamp">
<attribute name="useNowForDefault" value="true"/>
</property>[/xml]
For more information about this technique, see the Assigning FeatureDescriptorValues with the <attribute> Tag section in this chapter.
Hi.. I’m using Timestamp with Time Zone data type, what would be the xml representation for it?
You probably want to use the timestamp repository data type.