GET api/v1/datetime/{format}
Returns the UTC DateTime in various formats.
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| format |
The format to use for the FormattedDateTimeString. |
string |
None. |
Body Parameters
None.
Response Information
Resource Description
DateTimeDto| Name | Description | Type | Additional 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": "2025-10-28T06:06:57.1322426+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>2025-10-28T06:06:57.1322426Z</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>