From 6d165068e9ffe052dd42366cb51d8f280100faea Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Mon, 29 May 2023 01:20:31 -0500 Subject: [PATCH] Add a grace period for expiring events in the past --- wxdata/source/scwx/awips/text_product_message.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wxdata/source/scwx/awips/text_product_message.cpp b/wxdata/source/scwx/awips/text_product_message.cpp index 7d33e713..9b2a9149 100644 --- a/wxdata/source/scwx/awips/text_product_message.cpp +++ b/wxdata/source/scwx/awips/text_product_message.cpp @@ -156,8 +156,9 @@ TextProductMessage::segment_event_begin(std::size_t s) const hours {beginHour} + minutes {beginMinute}; // If the begin date is after the end date, assume the start time - // was the previous month - if (eventBegin > eventEnd) + // was the previous month (give a 1 day grace period for expiring + // events in the past) + if (eventBegin > eventEnd + 24h) { // If the current end month is January if (endDate.month() == January)