Application Framework Reference

Splunk API

getTimeFormat()

The getTimeFormat() method gets a formatted absolute time used by the REST API. This method wraps Splunk.util.getConfigValue( 'DISPATCH_TIME_FORMAT' ) .

Synopsis

formattedTime = getTimeFormat()

Return Value

String

Server configured dispatch time format

Example

var context = this.getContext();var search = context.get('search');
var range = search.getTimeRange();
alert(range.getTimeFormat());
 

See Also

Splunk.util.getConfigValue()