Skip to content

Fix incorrect TIME parameter for WMS-T - #67965

Open
merydian wants to merge 3 commits into
qgis:masterfrom
merydian:fix-wrong-time-diplay-in-wmst
Open

merydian wants to merge 3 commits into
qgis:masterfrom
merydian:fix-wrong-time-diplay-in-wmst

Conversation

@merydian

@merydian merydian commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Description

The member QDateTimeEdits of QgsTemporalControllerWidget currently do not have a time specification set.

From the QDateTimeEdit docs:

When setting this property the timespec of the QDateTimeEdit remains the same and the timespec of the new QDateTime is ignored.

When then reading from a QDateTimeEdit again after setting a CET, there will currently be a time shift. Thus the new test before fails:

********* Start testing of TestQgsTemporalControllerWidget *********
Config: Using QtTest library 6.11.2, Qt 6.11.2 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 16.2.1 20260819 (Red Hat 16.2.1-2)), fedora 44
PASS   : TestQgsTemporalControllerWidget::initTestCase()
FAIL!  : TestQgsTemporalControllerWidget::testDatePersists() Compared values are not the same
   Actual   (mTemporalControllerWidget->mStartDateTime->date()): 2005/12/31
   Expected (start.date())                                     : 2006/01/01
   Loc: [/root/QGIS/tests/src/gui/testqgstemporalcontrollerwidget.cpp(84)]
PASS   : TestQgsTemporalControllerWidget::cleanupTestCase()
Totals: 2 passed, 1 failed, 0 skipped, 0 blacklisted, 572ms
********* Finished testing of TestQgsTemporalControllerWidget *********

(see: https://github.com/qgis/QGIS/actions/runs/40578527565/job/122509265577)

It's a 1h shift, since CET is UTC+1. The year here switches, since its around 1st of January.

This PR sets the time specification of the member QDateTimeEdits of QgsTemporalControllerWidget to excpect local time. This prevents the time shift when rereading the time from e.g. mStartDateTime in QgsTemporalControllerWidget.

Closes #67917

  • I certify that no AI tool(s) (Copilot, Claude, or something similar), LLMs, or agent based workflows were used or supported my development of this PR. See our policy about AI tool use.

No LLM, AI or agent assisted code contributions are allowed in the QGIS repository. If we subsequently discover that you have used an AI, LLM, or any agent-based workflow for your contribution, you will be subject to code reversion and contributor rights sanctioning. See QEP 408 for details.

@github-actions github-actions Bot added this to the 4.4.0 milestone Oct 26, 2026
@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
To execute locally, unzip the downloaded zip file and run bin\qgis-bin.exe in the extracted directory.
You might be prompted by Windows Defender click "Run anyway"
(Built from commit d37dbc0)

🍎 MacOS Qt6 builds

Download MacOS Qt6 builds of this PR for testing.
This app is not notarized, run sudo xattr -d com.apple.quarantine /Applications/QGIS*.app to avoid the warning
(Built from commit d37dbc0)

@merydian
merydian force-pushed the fix-wrong-time-diplay-in-wmst branch from 5cdc95d to 701b671 Compare October 26, 2026 14:30
@merydian
merydian force-pushed the fix-wrong-time-diplay-in-wmst branch from 9593eec to 8173b4a Compare October 27, 2026 20:29
@merydian
merydian marked this pull request as ready for review October 28, 2026 08:32
@merydian merydian closed this Oct 29, 2026
@merydian merydian reopened this Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

QGIS sends incorrect TIME parameter for WMS-T

1 participant