From b47b5d6a3ce3c29acf779889309e76d449f5ac46 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Thu, 1 Jul 2021 10:15:33 +0200 Subject: [PATCH] Fix for #9042 - When CTime is equal to a record of the data file, we expect to return this record --- src/SERVER/DD_GetData.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/SERVER/DD_GetData.c b/src/SERVER/DD_GetData.c index bce76c5..49c7ea4 100755 --- a/src/SERVER/DD_GetData.c +++ b/src/SERVER/DD_GetData.c @@ -1257,7 +1257,13 @@ int SetTime(DD_Var_t *DD_VarL, double VCTime) { TestTime = Time_GetValueFromVar(DD_VarL->ncID, TimeID, TimeIsDouble, start[0]); - if(CTime >= TestTime) + if(CTime == TestTime) + { + // BRE - 01/07/2021 - Fix for #9042 - When CTime is equal to a record of the data file, we expect to return this record ! + DD_VarL->nc_rec = start[0]; + More = 0; + } + else if(CTime > TestTime) { // if(start[0] +1 >= DD_VarL->Maxnc_rec) return(OUTOFTIME); if(start[0] +1 >= DD_VarL->Maxnc_rec) // We are in the gap between the last record -- libgit2 0.21.2