Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporting to geopackage changes field type from DATE to DATETIME #37857

Closed
uclaros opened this issue Jul 17, 2020 · 1 comment
Closed

Exporting to geopackage changes field type from DATE to DATETIME #37857

uclaros opened this issue Jul 17, 2020 · 1 comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Regression Something which used to work, but doesn't anymore Vectors Related to general vector layer handling (not specific data formats)

Comments

@uclaros
Copy link
Contributor

uclaros commented Jul 17, 2020

Describe the bug
When exporting a layer from oracle to geopackage, all input fields of type DATE are silently converted to type DATETIME in the output file.

QGIS and OS versions
15a4c39 on Debian testing

Additional context
This is a regression, it works as expected on my 3.13 build.

@uclaros uclaros added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Jul 17, 2020
@gioman gioman added the Regression Something which used to work, but doesn't anymore label Jul 17, 2020
@gioman gioman added the Vectors Related to general vector layer handling (not specific data formats) label Aug 5, 2020
@rouault
Copy link
Contributor

rouault commented Sep 14, 2020

It seems this behaviour is related to a change in the Oracle provider:

commit 3fae26f
Author: Nyall Dawson nyall.dawson@gmail.com
Date: Thu May 14 11:50:02 2020 +1000

[oracle] Treat DATE field types as datetime values
Fixes #28559

Looking at Oracle documentation, https://docs.oracle.com/cd/E11882_01/server.112/e10729/ch4datetime.htm#i1006006 , DATE can indeed stores hour, minute, seconds, so mapping to QGIS DateTime data type is appropriate

So not a bug

@rouault rouault closed this as completed Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Regression Something which used to work, but doesn't anymore Vectors Related to general vector layer handling (not specific data formats)
Projects
None yet
Development

No branches or pull requests

3 participants