Skip to content

Commit

Permalink
All timestamps in UTC #1095
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed Apr 23, 2021
1 parent 091af68 commit 1f3b72b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- The first extent in a Collection is always the overall extent, followed by more specific extents. ([#1064](https://github.com/radiantearth/stac-spec/issues/1064), [opengeospatial/ogcapi-features#520](https://github.com/opengeospatial/ogcapi-features/pull/520))
- Updated examples for automatic collection creation from code and validation ([#1080](https://github.com/radiantearth/stac-spec/pull/1080)
- Clarified that stac_extensions should also list extensions that are used in Collection summaries. ([#1077](https://github.com/radiantearth/stac-spec/issues/1077))
- `changed`, `created` (common metadata) and temporal extents (collections): Timestamps must be always in UTC ([#1095](https://github.com/radiantearth/stac-spec/issues/1095))

## [v1.0.0-rc.2] - 2021-03-30

Expand Down
2 changes: 1 addition & 1 deletion collection-spec/collection-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ Clients only interested in the overall extent will only need to access the first
It is recommended to only use multiple temporal extents if a union of them would then include a large
uncovered time span (e.g. only having data for the years 2000, 2010 and 2020).

Each inner array consists of exactly two dates and times.
Each inner array consists of exactly two dates and times, each in UTC.
Each date and time MUST be formatted according to [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6).
The temporal reference system is the Gregorian calendar.

Expand Down
3 changes: 2 additions & 1 deletion collection-spec/json-schema/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@
"string",
"null"
],
"format": "date-time"
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions item-spec/common-metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ Fields to provide additional temporal information such as ranges with a start an
| Field Name | Type | Description |
| ---------- | ------------ | ----------- |
| datetime | string\|null | See the [Item Spec Fields](item-spec.md#properties-object) for more information. |
| created | string | Creation date and time of the corresponding data (see below). |
| updated | string | Date and time the corresponding data (see below) was updated last. |
| created | string | Creation date and time of the corresponding data (see below), in UTC. |
| updated | string | Date and time the corresponding data (see below) was updated last, in UTC. |

All timestamps MUST be formatted according to [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6).

Expand Down
15 changes: 10 additions & 5 deletions item-spec/json-schema/datetime.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,34 @@
"title": "Date and Time",
"description": "The searchable date/time of the assets, in UTC (Formatted in RFC 3339) ",
"type": ["string", "null"],
"format": "date-time"
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"start_datetime": {
"title": "Start Date and Time",
"description": "The searchable start date/time of the assets, in UTC (Formatted in RFC 3339) ",
"type": "string",
"format": "date-time"
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"end_datetime": {
"title": "End Date and Time",
"description": "The searchable end date/time of the assets, in UTC (Formatted in RFC 3339) ",
"type": "string",
"format": "date-time"
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"created": {
"title": "Creation Time",
"type": "string",
"format": "date-time"
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"updated": {
"title": "Last Update Time",
"type": "string",
"format": "date-time"
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
}
}
}

0 comments on commit 1f3b72b

Please sign in to comment.