summaryrefslogtreecommitdiff
path: root/lib/streaming_apply.f90
diff options
context:
space:
mode:
Diffstat (limited to 'lib/streaming_apply.f90')
-rw-r--r--lib/streaming_apply.f9011
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/streaming_apply.f90 b/lib/streaming_apply.f90
index 72feda74..0a507481 100644
--- a/lib/streaming_apply.f90
+++ b/lib/streaming_apply.f90
@@ -281,7 +281,16 @@ contains
! Per-period UTC. Producer sends a fresh nutc in each
! period's configure frame so streaming_emit_decode can format the time
! field correctly (instead of "000000").
- if (in_cfg%nutc_set) params%nutc = in_cfg%nutc
+ if (in_cfg%nutc_set) then
+ params%nutc = in_cfg%nutc
+ ! Long-period FST4 numeric UTC also accepts legacy HHMM; ISO UTC is always HHMMSS.
+ if ((io_mode.eq.240.or.io_mode.eq.241.or.io_mode.eq.242).and.io_TRperiod.ge.60.and. &
+ params%nutc.le.2359) &
+ params%nutc=100*params%nutc
+ ! Legacy numeric Q65 times may be HHMM.
+ if (io_mode.eq.66.and.io_TRperiod.ge.60.and.params%nutc.le.2359) &
+ params%nutc=100*params%nutc
+ endif
! Phase 8 (RFC v1 §6.3/§4.1): utc (ISO "HH:MM:SS") is a SECOND route to nutc,
! kept alongside the legacy int nutc above. Applied AFTER nutc so utc WINS when
! a frame carries both (the richer ISO form). The apply order encodes the