Skip to content

Commit

Permalink
Revert change to date-time format #666
Browse files Browse the repository at this point in the history
The SWG opted to remove the substantive change from #653. This commit does
retain the administrative changes introduced in that commit.
  • Loading branch information
jyutzler committed Sep 6, 2023
1 parent 9d65494 commit a861d57
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 23 deletions.
9 changes: 2 additions & 7 deletions spec/core/1_base.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,10 @@ The columns of tables in a GeoPackage SHALL only be declared using one of the da
|TEXT{(maxchar_count)}| Variable length string encoded in either UTF-8 or UTF-16, determined by PRAGMA encoding; see http://www.sqlite.org/pragma.html#pragma_encoding. The optional maxchar_count defines the maximum number of characters in the string. If not specified, the length is unbounded. The count is provided for informational purposes, and applications MAY choose to truncate longer strings if encountered. When present, it is best practice for applications to adhere to the character count. Stored as SQLite TEXT.
|BLOB{(max_size)} | Variable length binary data. The optional max_size defines the maximum number of bytes in the blob. If not specified, the length is unbounded. The size is provided for informational purposes. When present, it is best practice for applications adhere to the maximum blob size. Stored as SQLite BLOB.
|<geometry_type_name> | Geometry encoded as per clause <<gpb_format>>. <geometry type_name> is one of the core geometry types listed in <<geometry_types>> encoded per clause 2.1.3 or a geometry type encoded per an extension such as <<extension_geometry_types>>. Geometry Types XY, XYZ, XYM and XYZM geometries use the same data type. Stored as SQLite BLOB.
|DATE | http://www.iso.org/iso/catalogue_detail?csnumber=40874[ISO 8601] <<I29>> date string in the form YYYY-MM-DD encoded in either UTF-8 or UTF-16. See TEXT. Stored as SQLite TEXT (see TEXT above).
|DATETIME | ISO-8601 date/time string in the form YYYY-MM-DDTHH:MM[:SS.SSS]Z with T separator character, Z suffix for coordinated universal time (UTC), and encoded in either UTF-8 or UTF-16. Seconds and fractional seconds are OPTIONAL. Fractional seconds MAY have fewer or more than three digits. Stored as SQLite TEXT (see TEXT above).
|DATE | http://www.iso.org/iso/catalogue_detail?csnumber=40874[ISO 8601] <<I29>> date string in the form YYYY-MM-DD encoded in either UTF-8 or UTF-16. Stored as SQLite TEXT (see TEXT above).
|DATETIME | ISO-8601 date/time string in the form YYYY-MM-DDTHH:MM:SS.SSSZ with T separator character and Z suffix for coordinated universal time (UTC) encoded in either UTF-8 or UTF-16. Stored as SQLite TEXT (see TEXT above).
|=======================================================================

[WARNING]
====
The SQLite https://sqlite.org/lang_datefunc.html[Date And Time Functions] internally store a timestamp in a way that makes the maximum precision 1 millisecond. Therefore, those functions are unsuitable for dealing with timestamps having a higher precision than one millisecond.
====

====== File Integrity

[[r6]]
Expand Down
1 change: 1 addition & 0 deletions spec/core/release_notes/1.4.0/annex-history.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
|2023-03-29 |0.2 |J. Yutzler | 4, 6| 640/655
|2023-05-24 |0.3 |J. Yutzler | 4, 6| 660/661
|2023-05-31 |0.4 |J. Yutzler | 4 | OAB Review
|2023-05-31 |0.4 |J. Yutzler | 4, 6 | Open Comment Period
|====================

For the complete revision history, see link:https://github.com/opengeospatial/geopackage/commits/master/spec/core/release_notes/1.4.0[the GitHub repository].
13 changes: 7 additions & 6 deletions spec/core/release_notes/1.4.0/clause-4-change-log.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ See <<Clause_Critical>> for more information on critical changes and
|=======================================================================
|Source |Identifier |Type |Section |Description |Purpose
|link:https://github.com/opengeospatial/geopackage/issues/647[#647] |link:https://github.com/opengeospatial/geopackage/pull/650[#650] | A | 1.1.1.1.1 | Add note explaining how to retrieve the GeoPackage Version | Clarity
|[yellow-background]#link:https://github.com/opengeospatial/geopackage/issues/648[#648]#
|[yellow-background]#link:https://github.com/opengeospatial/geopackage/pull/653[#653]#
|[yellow-background]#S#
|[yellow-background]#1.1.1.1.3, 1.1.3.1.2, Annex F.8#
|[yellow-background]#Make DATETIME format more flexible#
|[yellow-background]#Correctness#
|[line-through]#link:https://github.com/opengeospatial/geopackage/issues/648[#648]#
|[line-through]#link:https://github.com/opengeospatial/geopackage/pull/653[#653]#
|[line-through]#S#
|[line-through]#1.1.1.1.3, 1.1.3.1.2, Annex F.8#
|[line-through]#Make DATETIME format more flexible#
|[line-through]#Correctness#
|link:https://github.com/opengeospatial/geopackage/issues/640[#640] |link:https://github.com/opengeospatial/geopackage/pull/655[#655] | A | 1.1.1.1.1 | Move example indicating GeoPackage Version format to a note | Clarity
|[yellow-background]#link:https://github.com/opengeospatial/geopackage/issues/629[#629]#
|[yellow-background]#link:https://github.com/opengeospatial/geopackage/pull/656[#656]#
Expand All @@ -62,4 +62,5 @@ See <<Clause_Critical>> for more information on critical changes and
|[yellow-background]#Annex F.3#
|[yellow-background]#Replace update1 trigger with update6 and update7 to support upsert operations#
|[yellow-background]#Correctness#
|link:https://github.com/opengeospatial/geopackage/issues/665[#665] |link:https://github.com/opengeospatial/geopackage/pull/666[#666] | A | 1.1.1.1.3, 1.1.3.1.2, Annex F.8 | Point all references to date-time formats back to Requirement #5 | Clarity
|=======================================================================
25 changes: 15 additions & 10 deletions spec/core/release_notes/1.4.0/clause-6-substantive.adoc
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
[[Clause_Substantive]]
== Description of Substantive Changes

=== Make DATETIME format more flexible
In GeoPackage 1.3.1 and prior, Requirement 5 specified that DATETIME formats must conform to the template `YYYY-MM-DDTHH:MM:SS.SSSZ`.
This is unnecessarily restrictive and can cause problems in the following ways:

* Requiring unnecessary precision may add bloat to the GeoPackage.
* Requiring a very specific precision may cause problems when converting other data to GeoPackage, including loss of data and the necessity of an additional agent to artificially modify the existing data so that it conforms to the template.

In fact, https://sqlite.org/lang_datefunc.html#time_values[SQLite documentation] offers a number of legal formats and allows fractional seconds to have fewer or more than three digits.
In response, the SWG agreed to relax the definition, while retaining compatibility with ISO-8601.

=== Relax Requirement #4
The *GeoPackage* designation was originally designed to indicate a schema with maximum interoperability.
However, as the standard has evolved, it has become increasingly important for GeoPackages to contain certain extensions.
Expand Down Expand Up @@ -38,3 +28,18 @@ These changes are designed to prevent interoperability problems and
do not introduce any new interoperability risks.
Clients are encouraged to apply these fixes to older versions of GeoPackage as well.
The Executable Test Suite will be updated to ensure that either set of triggers is treated as compliant.

=== [line-through]#Make DATETIME format more flexible#
[line-through]#In GeoPackage 1.3.1 and prior, Requirement 5 specified that DATETIME formats must conform to the template `YYYY-MM-DDTHH:MM:SS.SSSZ`.
This is unnecessarily restrictive and can cause problems in the following ways:#

* [line-through]#Requiring unnecessary precision may add bloat to the GeoPackage.#
* [line-through]#Requiring a very specific precision may cause problems when converting other data to GeoPackage, including loss of data and the necessity of an additional agent to artificially modify the existing data so that it conforms to the template.#

[line-through]#In fact, https://sqlite.org/lang_datefunc.html#time_values[SQLite documentation] offers a number of legal formats and allows fractional seconds to have fewer or more than three digits.
In response, the SWG agreed to relax the definition, while retaining compatibility with ISO-8601.#

[NOTE]
====
After reviewing the potential impact on GeoPackage clients, changes regarding date-time formats have been deferred until further notice.
====

0 comments on commit a861d57

Please sign in to comment.