Integration Server 10.7 | Built-In Services Reference Guide | Datetime Folder | Summary of Elements in this Folder | pub.datetime:build
 
pub.datetime:build
WmPublic. Builds a date/time string using the specified pattern and the supplied date/time elements.
Input Parameters
pattern
String The pattern with which to format the string. For more information about these pattern letters and symbols, see the Oracle Java API documentation for the DateTimeFormatter class.
year
String Optional. The year expressed as a 4-digit Integer. If you do not specify year, the year will be from the current date which is determined by the JVM in which Integration Server runs. If you specify an invalid value for year, the service will end with an error from the JDK.
month
String Optional. The month expressed as an Integer where January is 1. If you do not specify month, the month will be from the current date which is determined by the JVM in which Integration Server runs. If you specify an invalid value for month, the service will end with an error from the JDK.
dayOfMonth
String Optional. The day of the month expressed as an Integer, starting with 1 as the first day of the month. If you do not specify dayOfMonth the day of the month will be from the current date which is determined by the JVM in which Integration Server runs. If you specify an invalid value for day, the service will end with an error from the JDK.
hour
String Optional. The hour of the day expressed as an Integer from 0 through 23. If you do not specify hour, the hour will be from the current time which is determined by the JVM in which Integration Server runs. If you specify an invalid value for hour, the service will end with an error from the JDK.
minute
String Optional. The minute expressed as an Integer from 0 through 59. If you do not specify minute, the minute will be from the current time which is determined by the JVM in which Integration Server runs. If you specify an invalid value for minute, the service will end with an error from the JDK.
second
String Optional. The seconds of the hour expressed as an Integer from 0 through 59. If you do not specify second, the second will be from the current time which is determined by the JVM in which Integration Server runs. If you specify an invalid value for second, the service will end with an error from the JDK.
millis
String Optional. The number of milliseconds expressed as a Long. If you do not specify millis, the millis will be from the current time which is determined by the JVM in which Integration Server runs. If you specify an invalid value for millis, the service will end with an error from the JDK.
timezone
String Optional. The time zone. If you specify a value for timezone, the service ignores the useSystemTimeZone parameter value. Software AG recommends supplying the full name for timezones, such as Asia/Tokyo, or using UTC.
If pattern includes a timezone, you must specify timezone input parameter value or set useSystemTimeZone to true.
useSystemTimeZone
String Optional. Indicates whether the service uses the time zone of the Integration Server JVM if timezone was not specified. Set to:
*true to use the time zone of Integration Server when timezone is not specified.
*false if you do not want the service to use the timezone of Integration Serverif timezone was not set. The default is false.
If pattern includes a timezone, you must specify the timezone input parameter value or set useSystemTimeZone to true.
To match the behavior of pub.date:dateTimeBuild which produced a date/time that always included a time zone set useSystemTimeZone to true. This ensures that if timezone is not specified, the resulting date/time will include a time zone.
locale
String Optional. The locale in which to express the date. 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. An invalid locale results in an error from the JDK.
Output Parameters
value
String The formatted date and time.
Usage Notes
The pub.datetime:build service replaces the pub.date:dateBuild and pub.date:dateTimeBuild services which are deprecated.
If you specify a parameter that does not exist in the supplied pattern, the service ignores that parameter.
If you do not specify a timezone, useSystemTimeZone is set to false, and the pattern includes a time zone, the service ends with an exception.
If a time zone is provided as input to the service either in the timezone parameter or by setting useSystemTimeZone to true, the pub.datetime:build service calculates the date/time starting with a "zoned" date/time. The resulting values can differ when daylight savings time transitions are in effect. If no time zone is provided as input to the service either by not specifying timezone or by setting useSystemTimeZone to false, then the pub.datetime:build service calculates the date/time starting with an "unzoned" date/time.
The pub.datetime:build service is similar to pub.date:dateBuild and pub.date:dateTimeBuild, however, the pub.datetime:build service allows the building of a date/time that does not include a time zone. Furthermore, the pub.datetime:build service assembles a date/time using each of the provided parameters. Consequently the pub.datetime:build service can build a date/time with a value that would be invalid in the current time zone, such as a date/time that would fall into the gap of a daylight saving time transition. This is unlike the pub.date:dateBuild and pub.date:dateTimeBuild services which build a local java.util.Date object that uses the timezone of the machine running Integration Server. The pub.date:dateBuild and pub.date:dateTimeBuild service then applies the offset between the local timezone and the specified timezone.