GET api/v1/datetime/zones/{id}/{format}

Gets the date time corrected for the timezone id.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

The Id of the timezone

string

Required

format

Optional parameter to specify the format. Defaults to "dd-MMM-yyyy HH:mm:ss zzz". e.g. 05-Jan-2014 15:02:03 +02:00

string

None.

Body Parameters

None.

Response Information

Resource Description

DateTimeDto
NameDescriptionTypeAdditional information
DateTime

Raw DateTime

date

None.

FormattedDateTimeString

The date time as a string formatted as requested or defaulting to "dd-MMM-yyyy HH:mm:ss"

string

None.

TimeZoneId

The Id of the timezone used for the DateTime

string

None.

UtcOffset

The DateTimeOffset offset from Utc (when corrected for TimeZone)

time interval

None.

Iso8601Format

Gets the date time as a Iso8601 format.

string

None.

Response Formats

application/json, text/json, application/senml+json

Sample:
{
  "DateTime": "2024-03-29T00:27:35.2396577+00:00",
  "FormattedDateTimeString": "sample string 2",
  "TimeZoneId": "sample string 3",
  "UtcOffset": "00:00:00.1234567",
  "Iso8601Format": "sample string 5"
}

application/xml, text/xml

Sample:
<DateTimeDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AnalysisUK.Tinamous.www.ApiControllers.Models.DateTimeModels">
  <DateTime xmlns:d2p1="http://schemas.datacontract.org/2004/07/System">
    <d2p1:DateTime>2024-03-29T00:27:35.2396577Z</d2p1:DateTime>
    <d2p1:OffsetMinutes>0</d2p1:OffsetMinutes>
  </DateTime>
  <FormattedDateTimeString>sample string 2</FormattedDateTimeString>
  <Iso8601Format>sample string 5</Iso8601Format>
  <TimeZoneId>sample string 3</TimeZoneId>
  <UtcOffset>PT0.1234567S</UtcOffset>
</DateTimeDto>