Get the backend time

Content

Resource URL

https://apps.ticketmatic.com/api/1/{accountname}/diagnostics/time

Description

Returns the current system time, in UTC.

The returned timestamp uses the ISO-8601 format.

This call does not require an Authorization header to be set (it’s the only call that allows this) and can be used to investigate timestamp issues when trying to sign API requests.

Example

Request

1use Ticketmatic\Endpoints\Diagnostics;
2
3$result = Diagnostics::time($client);

Response

 1object(\Ticketmatic\Model\Timestamp) (1) {
 2  ["systemtime"]=>
 3  object(\DateTime) (3) {
 4    ["date"]=>
 5    string(26) "2014-09-26 15:12:26.000000"
 6    ["timezone_type"]=>
 7    int(3)
 8    ["timezone"]=>
 9    string(3) "UTC"
10  }
11}
12

Request

1import (
2    "github.com/ticketmatic/tm-go/ticketmatic"
3    "github.com/ticketmatic/tm-go/ticketmatic/diagnostics"
4)
5
6result, err := diagnostics.Time(client)

Response

1result := &ticketmatic.Timestamp{
2    Systemtime: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26T15:12:26")),
3}

Request

1GET /api/1/{accountname}/diagnostics/time HTTP/1.1

Response

1HTTP/1.1 200 OK
2Content-Type: application/json
3
4{
5    "systemtime": "2014-09-26T15:12:26"
6}

Result fields

FieldDescription
systemtime
timestamp

Current system time

Example value:"2014-09-26T15:12:26"

Type reference: Timestamp