diff --git a/php/libraries/NDB_BVL_Instrument_LINST.class.inc b/php/libraries/NDB_BVL_Instrument_LINST.class.inc index 3886e27e1a9..099556e3c8b 100644 --- a/php/libraries/NDB_BVL_Instrument_LINST.class.inc +++ b/php/libraries/NDB_BVL_Instrument_LINST.class.inc @@ -576,7 +576,7 @@ class NDB_BVL_Instrument_LINST extends \NDB_BVL_Instrument // Set date format $dateFormat = isset($pieces[5]) ? trim($pieces[5]) : ""; - if (isset($dateFormat) && $dateFormat != "") { + if (isset($dateFormat) && $dateFormat != "" && $dateFormat !== "Date") { if ($dateFormat === 'MonthYear') { // Shows date without day of month $this->addMonthYear( @@ -595,7 +595,7 @@ class NDB_BVL_Instrument_LINST extends \NDB_BVL_Instrument } else { // addDateElement appends '_date' to the field name so // remove it first here - if (strpos($pieces[1], "_date") !== false) { + if (substr($pieces[1], -5) == "_date") { $pieces[1] = substr( $pieces[1], 0,