= TrivialTimeDetector
:description: Learn how the TrivialTimeDetector in OpenNMS {page-component-title} finds and assigns services based on a timely response from a Trivial Time Service.

The TrivialTimeDetector finds and assigns services based on a timely response from a Trivial Time Service.

NOTE: This detector utilizes the Time Protocol, not NTP.

== Detector facts

[options="autowidth"]
|===
| Implementation | `org.opennms.netmgt.provision.detector.simple.TrivialTimeDetector`
|===

== Configuration and use

The TrivialTimeDetector uses the xref:reference:provisioning/detectors.adoc#ref-detector-provisioning-common-parameters[common configuration parameters].

.Optional parameters for the TrivialTimeDetector
[options="header, autowidth"]
[cols="1,3,1"]
|===

| Parameter
| Description
| Default value

| protocol
| Default Layer 4 protocol to use.
| tcp

| port
| Port to query.
| 37

| allowedSkew
| Default permissible skew in seconds between the remote and local clocks.
| 30

|===

== Example configuration

[source,xml]
----
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<foreign-source date-stamp="2010-06-29T13:15:30.494+02:00" name="test" xmlns="http://xmlns.opennms.org/xsd/config/foreign-source">
  <scan-interval>1d</scan-interval>
  <detectors>
    <detector class="org.opennms.netmgt.provision.detector.simple.TrivialTimeDetector" name="TrivialTime">
      <parameter key="port" value="37"/>
      <parameter key="protocol" value="tcp" />
      <parameter key="allowedSkew" value="30"/>
    </detector>
  </detectors>
  <policies/>
</foreign-source>
----