Skip to content
Permalink
Browse files

Simpler approach to remove time component of a datetime value

(cherry picked from commit 3873085)
  • Loading branch information
nyalldawson committed Feb 19, 2021
1 parent ac8f336 commit b08595eaffc42de478a782f0f46b0295cc23b3f3
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/providers/wms/qgswmscapabilities.cpp
@@ -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();

0 comments on commit b08595e

Please sign in to comment.