Skip to content

Commit

Permalink
Simpler approach to remove time component of a datetime value
Browse files Browse the repository at this point in the history
(cherry picked from commit 3873085)
  • Loading branch information
nyalldawson committed Feb 19, 2021
1 parent ac8f336 commit b08595e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/wms/qgswmscapabilities.cpp
Expand Up @@ -326,7 +326,7 @@ QDateTime QgsWmsSettings::findLeastClosestDateTime( const QDateTime &dateTime, b
long long seconds;

if ( dateOnly )
seconds = QDateTime::fromString( closest.date().toString() ).toSecsSinceEpoch();
seconds = QDateTime( closest.date(), QTime( 0, 0, 0 ) ).toSecsSinceEpoch();
else
seconds = closest.toSecsSinceEpoch();

Expand Down

0 comments on commit b08595e

Please sign in to comment.