Skip to content
Permalink
Browse files
force time to be UTC for mesh layer (#43291)
force override time to be UTC
  • Loading branch information
vcloarec committed Jun 15, 2021
1 parent d482bc0 commit bb82807623a7bd1bc231300177157e6c8280e6b1
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/core/mesh/qgsmeshlayer.cpp
@@ -536,7 +536,10 @@ QgsMeshDatasetIndex QgsMeshLayer::datasetIndexAtTime( const QgsDateTimeRange &ti
return QgsMeshDatasetIndex( datasetGroupIndex, -1 );

const QDateTime layerReferenceTime = mTemporalProperties->referenceTime();
qint64 startTime = layerReferenceTime.msecsTo( timeRange.begin() );
QDateTime utcTime = timeRange.begin();
if ( utcTime.timeSpec() != Qt::UTC )
utcTime.setTimeSpec( Qt::UTC );
qint64 startTime = layerReferenceTime.msecsTo( utcTime );

return mDatasetGroupStore->datasetIndexAtTime( startTime, datasetGroupIndex, mTemporalProperties->matchingMethod() );
}

0 comments on commit bb82807

Please sign in to comment.