Skip to content

Commit eecb40b

Browse files
committed
ECC-2017: BUFR: DateTime extraction doesn't work for singleton intervals
1 parent 3334f83 commit eecb40b

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/accessor/grib_accessor_class_bufr_extract_datetime_subsets.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ int grib_accessor_bufr_extract_datetime_subsets_t::select_datetime()
276276
goto cleanup;
277277
}
278278

279-
if (julianEnd <= julianStart) {
279+
if (julianEnd < julianStart) {
280280
grib_context_log(c, GRIB_LOG_ERROR, "Wrong definition of time interval: end (%s) is not after start (%s)", end_str, start_str);
281281
ret = GRIB_INTERNAL_ERROR;
282282
goto cleanup;

tests/bufr_filter_extract_datetime.sh

+11
Original file line numberDiff line numberDiff line change
@@ -301,5 +301,16 @@ ${tools_dir}/codes_bufr_filter -o $outputBufr $fRules $temp 2>$errlog
301301
grep -q "WARNING.*Key '#1#second' is missing" $errlog
302302
rm -f $temp $errlog
303303

304+
305+
#-----------------------------------------------------------
306+
echo "Test ECC-2017 ..."
307+
# DateTime extraction doesn't work for singleton intervals
308+
#-----------------------------------------------------------
309+
inputBufr="b003_56.bufr"
310+
generate_filter 20121031001417 20121031001417 1
311+
${tools_dir}/codes_bufr_filter -o $outputBufr $fRules $inputBufr
312+
313+
314+
304315
# Clean up
305316
rm -f $outputRef $outputFilt $outputBufr $fLog $fRules

0 commit comments

Comments
 (0)