Representation of dates and times
This section explains how dates and times are represented in the Connectivity Management API.
The topics covered include:
- The format in which the API represents dates and times
- Understanding the formatting symbols
- Examples of API-compliant date and time representations
ISO 8601
The Connectivity Management API represents dates and times using the International Organization for Standardization (ISO) 8601 standard. ISO 8601 is a standardized way of representing dates and times, which eliminates ambiguity when communicating internationally.
ISO 8601 uses the structure: YYYY-MM-ddTHH:mm:ss.ss±hh:mm
For example, 17:19:57 hours (GMT) on the 9th of January 2019 is represented as: 2019-01-09T17:19:57Z
Tip
If you are providing a date or a date and time in an API call, you must use the ISO 8601 format.
ISO 8601 formatting symbols
This table explains the symbols used to represent dates and times in the ISO 8601 format.
Symbol | Represents | Accepted Values | Example |
---|---|---|---|
YYYY | Represents a four-digit year as part of a date | 2019 | |
MM | Represents a two-digit month as part of a date | 01 - 12 | 12 |
dd | Represents a two digit day as part of a date | 01 - 31 | 30 |
T | Indicates that a time value follows All values with a time must begin with a T | T | |
HH | Represents a two-digit hour as part of a time | 00 - 24 | 17 |
mm | Represents a two-digit minute as part of a time | 00 - 59 | 59 |
ss | Represents a two-digit second as part of a time | 00 - 59 | 59 |
± | Represents the offset from the Greenwich timezone + represents the time zone offset to the east of Greenwich - represents the time zone offset to the west of Greenwich If the timezone is Greenwich, this value is Z | +, - or Z | + |
hh | Represents a two-digit hour as part of the timezone offset | 00 - 59 | 01 |
mm | Represents a two-digit minute as part of the timezone offset | 00 - 59 | 00 |
Examples
Expressing a Date and Time Without an Offset | |
---|---|
Date and Time | 17:19:57 hours (GMT) on the 9th of January 2019 |
ISO 8601 Format | 2019-01-09T17:19:57Z |
Expressing a Date and Time With an Offset of Greenwich +1 hour | |
---|---|
Date and Time | 17:19:57 hours (Greenwich +1) on the 9th of January 2019 |
ISO 8601 Format | 2019-01-09T17:19:57+01:00 |
Expressing a Date and Time With an Offset of Greenwich -1 hour | |
---|---|
Date and Time | 17:19:57 hours (Greenwich -1) on the 9th of January 2019 |
ISO 8601 Format | 2019-01-09T17:19:57-01:00 |