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
  • Loading branch information
nyalldawson committed Jan 17, 2021
1 parent 5403554 commit 3873085
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/wms/qgswmscapabilities.cpp
Expand Up @@ -325,7 +325,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 3873085

Please sign in to comment.