> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ouster.com/sensor-docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ouster.com/sensor-docs/_mcp/server.

# Get the system time configuration

GET http://os-992244000006.local/api/v1/time

Get the system time configuration for all timing components of the sensor.

Reference: https://docs.ouster.com/sensor-docs/firmware/api-reference/ouster-http-api/time/get-time

## Response

### 200

Current time status

- `ptp` (TimePTP, optional)
- `sensor` (TimeSensor, optional)
- `system` (TimeSystem, optional)

## Types

### TimePTP

- `current_data_set` (TimePtpCurrentDataSet, optional) — Result of the PMC `GET CURRENT_DATA_SET` command.
- `parent_data_set` (TimePtpParentDataSet, optional) — Result of the PMC `GET PARENT_DATA_SET` command.
- `port_data_set` (TimePtpPortDataSet, optional) — Result of the PMC `GET PORT_DATA_SET` command.
- `profile` (string, optional)
- `time_properties_data_set` (TimePtpTimePropertiesDataSet, optional) — Result of the PMC `GET TIME_PROPERTIES_DATA_SET` command.
- `time_status_np` (TimePtpTimeStatusNp, optional) — Result of the PMC `GET TIME_STATUS_NP` command. This is a linuxptp non-portable command. The [Red Hat manual](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/s1-using_the_ptp_management_client) provides some more information on these fields.

### TimeSensor

- `multipurpose_io` (TimeSensorMultipurposeIo, optional)
- `sync_pulse_in` (TimeSensorSyncPulseIn, optional)
- `timestamp` (TimeSensorTimestamp, optional)

### TimeSystem

- `monotonic` (float, optional) — Monotonic time of operating system. This timestamp never counts backwards and is the time since boot in seconds.
- `realtime` (float, optional) — Time in seconds since the Unix epoch, should match wall time if synchronized with external time source.
- `tracking` (TimeSystemTracking, optional) — Operating system time synchronization tracking status. See chronyc tracking [documentation]( https://chrony-project.org/doc/4.5/chronyc.html#tracking ) for more information.

### TimePtpCurrentDataSet

Result of the PMC `GET CURRENT_DATA_SET` command.

- `mean_path_delay` (double, optional)
- `offset_from_master` (double, optional) — Offset from master time source in nanoseconds as calculated during the last update from master.
- `steps_removed` (double, optional)

### TimePtpParentDataSet

Result of the PMC `GET PARENT_DATA_SET` command.

- `gm_clock_accuracy` (double, optional)
- `gm_clock_class` (double, optional)
- `gm_offset_scaled_log_variance` (double, optional)
- `grandmaster_identity` (string, optional) — This should match the local grandmaster clock. If this displays the sensor's clock identity (derived from Ethernet hardware address) then this indicates the sensor is not properly synchronized to a grandmaster.
- `grandmaster_priority1` (double, optional)
- `grandmaster_priority2` (double, optional)
- `observed_parent_clock_phase_change_rate` (double, optional)
- `observed_parent_offset_scaled_log_variance` (double, optional)
- `parent_port_identity` (string, optional)
- `parent_stats` (double, optional)

### TimePtpPortDataSet

Result of the PMC `GET PORT_DATA_SET` command.

- `announce_receipt_timeout` (double, optional)
- `delay_mechanism` (double, optional)
- `log_announce_interval` (double, optional)
- `log_min_delay_req_interval` (double, optional)
- `log_min_pdelay_req_interval` (double, optional)
- `log_sync_interval` (double, optional)
- `peer_mean_path_delay` (double, optional)
- `port_identity` (string, optional)
- `port_state` (string, optional) — This value will be `SLAVE` when a remote master clock is selected. See `parent_data_set` for selected master clock.
- `version_number` (double, optional)

### TimePtpTimePropertiesDataSet

Result of the PMC `GET TIME_PROPERTIES_DATA_SET` command.

- `current_utc_offset` (double, optional)
- `current_utc_offset_valid` (double, optional)
- `frequency_traceable` (double, optional)
- `leap59` (double, optional)
- `leap61` (double, optional)
- `ptp_timescale` (double, optional)
- `time_source` (double, optional)
- `time_traceable` (double, optional)

### TimePtpTimeStatusNp

Result of the PMC `GET TIME_STATUS_NP` command. This is a linuxptp non-portable command. The [Red Hat manual](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/s1-using_the_ptp_management_client) provides some more information on these fields.

- `cumulative_scaled_rate_offset` (double, optional)
- `gm_identity` (string, optional) — Selected grandmaster clock identity.
- `gm_present` (boolean, optional) — True when grandmaster has been detected. This may stay true even if grandmaster goes off-line. Use `port_data_set.port_state` to determine up-to-date synchronization status. When this is false then the local clock is selected.
- `gm_time_base_indicator` (double, optional)
- `ingress_time` (double, optional) — Indicates when the last PTP message was received. Units are in nanoseconds.
- `last_gm_phase_change` (string, optional)
- `master_offset` (double, optional)
- `scaled_last_gm_phase_change` (double, optional)

### TimeSensorMultipurposeIo

- `mode` (string, optional)
- `sync_pulse_out` (TimeSensorMultipurposeIoSyncPulseOut, optional)
- `nmea` (TimeSensorMultipurposeIoNmea, optional)

### TimeSensorSyncPulseIn

- `diagnostics` (TimeSensorSyncPulseInDiagnostics, optional)
- `locked` (double, optional)
- `polarity` (enum, optional) — Signal polarity type
  - Allowed values: `ACTIVE_HIGH`, `ACTIVE_LOW`

### TimeSensorTimestamp

- `mode` (enum, optional, default: TIME_FROM_INTERNAL_OSC) — Timestamp mode for sensor time synchronization
  - Allowed values: `TIME_FROM_INTERNAL_OSC`, `TIME_FROM_SYNC_PULSE_IN`, `TIME_FROM_PTP_1588`
- `time` (float, optional)
- `time_options` (TimeSensorTimestampTimeOptions, optional)

### TimeSystemTracking

Operating system time synchronization tracking status. See chronyc tracking [documentation]( https://chrony-project.org/doc/4.5/chronyc.html#tracking ) for more information.

- `frequency` (float, optional)
- `last_offset` (float, optional) — Estimated local offset on the last clock update.
- `leap_status` (string, optional)
- `ref_time_utc` (float, optional) — UTC Time at which the last measurement from the reference source was processed.
- `reference_id` (string, optional)
- `remote_host` (string, optional) — This is either `ptp` if the system is synchronizing to a PTP time source or the address of a remote NTP server the system has selected if the sensor is connected to the Internet.
- `residual_frequency` (float, optional)
- `rms_offset` (float, optional) — Long-term average of the offset value
- `root_delay` (float, optional)
- `root_dispersion` (float, optional)
- `skew` (float, optional)
- `stratum` (double, optional)
- `system_time_offset` (double, optional) — Time delta (in seconds) between the estimate of the operating system time and the current true time.
- `update_interval` (float, optional)

### TimeSensorMultipurposeIoSyncPulseOut

- `polarity` (enum, optional) — Signal polarity type
  - Allowed values: `ACTIVE_HIGH`, `ACTIVE_LOW`
- `frequency_hz` (double, optional)
- `angle_deg` (double, optional)
- `pulse_width_ms` (double, optional)

### TimeSensorMultipurposeIoNmea

- `baud_rate` (enum, optional, default: BAUD_9600)
  - Allowed values: `BAUD_9600`, `BAUD_115200`
- `diagnostics` (TimeSensorMultipurposeIoNmeaDiagnostics, optional)
- `ignore_valid_char` (double, optional)
- `leap_seconds` (double, optional)
- `locked` (double, optional)
- `polarity` (enum, optional) — Signal polarity type
  - Allowed values: `ACTIVE_HIGH`, `ACTIVE_LOW`

### TimeSensorSyncPulseInDiagnostics

- `count` (double, optional)
- `count_unfiltered` (double, optional)
- `last_period_nsec` (double, optional)

### TimeSensorTimestampTimeOptions

- `internal_osc` (double, optional)
- `ptp_1588` (double, optional)
- `sync_pulse_in` (double, optional)

### TimeSensorMultipurposeIoNmeaDiagnostics

- `decoding` (TimeSensorMultipurposeIoNmeaDiagnosticsDecoding, optional)
- `io_checks` (TimeSensorMultipurposeIoNmeaDiagnosticsIoChecks, optional)

### TimeSensorMultipurposeIoNmeaDiagnosticsDecoding

- `date_decoded_count` (double, optional)
- `last_read_message` (string, optional)
- `not_valid_count` (double, optional)
- `utc_decoded_count` (double, optional)

### TimeSensorMultipurposeIoNmeaDiagnosticsIoChecks

- `bit_count` (double, optional)
- `bit_count_filtered` (double, optional)
- `char_count` (double, optional)
- `start_char_count` (double, optional)

## Examples

**Response**

```json
{
  "ptp": {
    "current_data_set": {
      "mean_path_delay": 120.5,
      "offset_from_master": -350.2,
      "steps_removed": 2
    },
    "parent_data_set": {
      "gm_clock_accuracy": 25,
      "gm_clock_class": 248,
      "gm_offset_scaled_log_variance": 500,
      "grandmaster_identity": "bc0fa7.fffe.00546b",
      "grandmaster_priority1": 128,
      "grandmaster_priority2": 128,
      "observed_parent_clock_phase_change_rate": 0.0001,
      "observed_parent_offset_scaled_log_variance": 300,
      "parent_port_identity": "bc0fa7.fffe.00546b-0",
      "parent_stats": 15
    },
    "port_data_set": {
      "announce_receipt_timeout": 3,
      "delay_mechanism": 1,
      "log_announce_interval": 1,
      "log_min_delay_req_interval": 0,
      "log_min_pdelay_req_interval": 0,
      "log_sync_interval": 0,
      "peer_mean_path_delay": 110.7,
      "port_identity": "bc0fa7.fffe.00546b-1",
      "port_state": "SLAVE",
      "version_number": 2
    },
    "profile": "default",
    "time_properties_data_set": {
      "current_utc_offset": 37,
      "current_utc_offset_valid": 1,
      "frequency_traceable": 1,
      "leap59": 0,
      "leap61": 0,
      "ptp_timescale": 1,
      "time_source": 160,
      "time_traceable": 1
    },
    "time_status_np": {
      "cumulative_scaled_rate_offset": 0.0000025,
      "gm_identity": "bc0fa7.fffe.003aa6",
      "gm_present": true,
      "gm_time_base_indicator": 0,
      "ingress_time": 1582605079123456800,
      "last_gm_phase_change": "0x0000'0000000000001234.5678",
      "master_offset": -350,
      "scaled_last_gm_phase_change": 1234.5678
    }
  },
  "sensor": {
    "multipurpose_io": {
      "mode": "OFF",
      "sync_pulse_out": {
        "polarity": "ACTIVE_HIGH",
        "frequency_hz": 10,
        "angle_deg": 90,
        "pulse_width_ms": 5
      },
      "nmea": {
        "baud_rate": "BAUD_9600",
        "diagnostics": {
          "decoding": {
            "date_decoded_count": 1500,
            "last_read_message": "$GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A",
            "not_valid_count": 3,
            "utc_decoded_count": 1497
          },
          "io_checks": {
            "bit_count": 12000,
            "bit_count_filtered": 11950,
            "char_count": 1500,
            "start_char_count": 1500
          }
        },
        "ignore_valid_char": 0,
        "leap_seconds": 18,
        "locked": 1,
        "polarity": "ACTIVE_HIGH"
      }
    },
    "sync_pulse_in": {
      "diagnostics": {
        "count": 5000,
        "count_unfiltered": 5050,
        "last_period_nsec": 1000000000
      },
      "locked": 1,
      "polarity": "ACTIVE_HIGH"
    },
    "timestamp": {
      "mode": "TIME_FROM_INTERNAL_OSC",
      "time": 1686825600.123,
      "time_options": {
        "internal_osc": 1,
        "ptp_1588": 0,
        "sync_pulse_in": 0
      }
    }
  },
  "system": {
    "monotonic": 123456.789,
    "realtime": 1686825600.123,
    "tracking": {
      "frequency": 3.943,
      "last_offset": -0.000123,
      "leap_status": "normal",
      "ref_time_utc": 1686825599,
      "reference_id": "0",
      "remote_host": "ptp",
      "residual_frequency": 0.000001,
      "rms_offset": 0.00005,
      "root_delay": 0.5,
      "root_dispersion": 0.3,
      "skew": 0.00001,
      "stratum": 2,
      "system_time_offset": 0.0002,
      "update_interval": 16
    }
  }
}
```

**SDK Code**

```python
import requests

url = "http://os-992244000006.local/api/v1/time"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'http://os-992244000006.local/api/v1/time';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "http://os-992244000006.local/api/v1/time"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("http://os-992244000006.local/api/v1/time")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("http://os-992244000006.local/api/v1/time")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'http://os-992244000006.local/api/v1/time');

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("http://os-992244000006.local/api/v1/time");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "http://os-992244000006.local/api/v1/time")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```