Skip to content

Commit

Permalink
revert selafin default timeunit to hours to not introduce regression …
Browse files Browse the repository at this point in the history
…see #185
  • Loading branch information
PeterPetrik committed Dec 13, 2019
1 parent 9f80268 commit 7a2665e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion mdal/frmts/mdal_selafin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,8 @@ void MDAL::DriverSelafin::addData( const std::vector<std::string> &var_names,
else
{
dataset = std::make_shared< MemoryDataset2D >( group.get(), true );
dataset->setTime( it->first, RelativeTimestamp::seconds ); // Seems that time unit in this format is only seconds
// see https://github.com/lutraconsulting/MDAL/issues/185
dataset->setTime( it->first, RelativeTimestamp::hours );
group->datasets.push_back( dataset );
}
for ( size_t nP = 0; nP < nPoints; nP++ )
Expand Down
2 changes: 1 addition & 1 deletion tests/test_selafin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ TEST( MeshSLFTest, MalpassetResultFrench )
ASSERT_NE( ds, nullptr );

double time = MDAL_D_time( ds );
EXPECT_TRUE( compareDurationInHours( 1.111111111, time ) );
EXPECT_TRUE( compareDurationInHours( 4000, time ) );

bool valid = MDAL_D_isValid( ds );
EXPECT_EQ( true, valid );
Expand Down

0 comments on commit 7a2665e

Please sign in to comment.