[QGIS-Developer] QGIS Date, Time and Time Zones

Nyall Dawson nyall.dawson at gmail.com
Thu Apr 29 15:31:19 PDT 2021


On Fri, 30 Apr 2021 at 04:10, C Hamilton <adenaculture at gmail.com> wrote:
>
> Last year there was a discussion on date, time, and timezones in QGIS. Back then the discussion was that QGIS uses the QDateTime object which supports timezones, but QGIS does not expose timezones anywhere. This I understand because time zones are the ultimate pain.
>
> I recently released a "Date/Time Tools" plugin (https://plugins.qgis.org/plugins/datetimetools/) to start providing some date/time/time zone conversions and support. I was thinking of providing additional processing algorithms that would create a QDateTime field with the timezone set, but the question I have is whether a vector layer were saved to something like a GPKG would the timezone even be preserved? It wouldn't be preserved with a ShapeFile. If timezones are not preserved then the only way to provide a date, time, timezone would be as an ISO8601 string (2007-01-14T21:05:02Z or 2007-01-14T06:55:53-0800).
>
> Is there currently any work going on for time zone support in QGIS that I am unaware of?

No, but it's **sorely** needed. We should start a QEP discussion to
collect thoughts here.

While (as Even has pointed out) GPKG has quite rudimentary time zone
support we support other formats and databases which have full support
for time zones (eg postgres), so there's definitely value in seeing
first class time zone support in QGIS!

Nyall


More information about the QGIS-Developer mailing list