Integration Server 10.5 | Built-In Services Reference Guide | Date Folder | Summary of Elements in this Folder | pub.date:dateTimeBuild
 
pub.date:dateTimeBuild
WmPublic. Deprecated - Replaced by pub.datetime:build.
Builds a date/time string using the specified pattern and date/time elements.
Input Parameters
pattern
String Pattern representing the format in which you want the time returned. For pattern-string notation, see Pattern String Symbols. If you do not specify pattern, dateTimeBuild returns null. If pattern contains a time zone and the timezone parameter is not set, the time zone of Integration Server is used.
year
String Optional. The year expressed in yyyy or yy format (for example, 01 or 2001). If you do not specify year or you specify an invalid value, dateTimeBuild uses the current year.
month
String Optional. The month expressed as a number (for example, 1 for January, 2 for February). If you do not specify month or you specify an invalid value, dateTimeBuild uses the current month.
dayofmonth
String Optional. The day of the month expressed as a number (for example, 1 for the first day of the month, 2 for the second day of the month). If you do not specify dayofmonth or you specify an invalid value, dateTimeBuild uses the current day.
hour
String Optional. The hour expressed as a number based on a 24-hour clock. For example, specify 0 for midnight, 2 for 2:00 A.M., and 14 for 2:00 P.M. If you do not specify hour or you specify an invalid value, dateTimeBuild uses 0 as the hour value.
minute
String Optional. Minutes expressed as a number. If you do not specify minute or you specify an invalid value, dateTimeBuild uses 0 as the minute value.
second
String Optional. Seconds expressed as a number. If you do not specify second or you specify an invalid value, dateTimeBuild uses 0 as the second value.
millis
String Optional. Milliseconds expressed as a number. If you do not specify millis or you specify an invalid value, dateTimeBuild uses 0 as the millis value.
timezone
String Optional. Time zone in which you want the output date and time expressed. Specify a time zone code as shown in Time Zones (for example, EST for Eastern Standard Time).
If you do not specify timezone, the value of the server's "user timezone" property is used. If this property has not been set, GMT is used.
locale
String Optional. Locale in which the date is to be expressed. For example, if locale is en (for English), the pattern EEE d MMM yyyy will produce Friday 23 August 2002, and the locale of fr (for French) will produce vendredi 23 août 2002.
If locale is not specified, Integration Server uses the value of the watt.server.session.locale.ignore server configuration parameter to determine whether the locale is obtained from the session used by the client that invoked the service or if the locale is the locale of Integration Server.
Output Parameters
value
String Date and time in format of pattern.
Usage Notes
The pub.date:dateTimeBuild service creates a date String by using the supplied year, month, dayofmonth, hour, minute, second, and millis to first create a local java.util.Date object. The local java.util.Date object uses the timezone of the machine running Integration Server. The pub.date:dateTimeBuild service then applies the offset between the local timezone and the specified timezone. Finally, the service uses pattern to convert the java.util.Date object to the String returned in value. Due to the way in which the pub.date:dateTimeBuild service works, if you run the pub.date:dateTimeBuild service with the same set of inputs on two different machines, each located in a different timezone, you will get different results.