https://gitlab.synchro.net/main/sbbs/-/commit/10b0a7426e61f920da3884e6
Modified Files:
src/sbbs3/fidopkt.h sbbsecho.c
Log Message:
SBBSecho: parse packed-message DateTime fields instead of fixed offsets
fmsgtime() read the day, year, hour, minute and second of a "01 Jan 86
02:34:56" DateTime from fixed character offsets, so any variation in
field width shifted the rest:
- CNet 3.0's 3-digit year ("15 Dec 125 18:01:00") parsed as 18:00:00
- a 4-digit year ("29 Nov 2026 23:30:15") parsed as the year 3926
- a day without a leading zero ("1 Jan 86") was taken for the SEAdog
format and produced a nonsense date
Parse the fields with sscanf() instead, falling back to the SEAdog
format ("Mon 1 Jan 86 02:34") as before. A 3-digit year is years since
1900, as C's tm_year is; a 4-digit year is taken as-is; 2-digit years
use the existing Y2K window. Dates in the usual formats parse exactly
as before.
The month name is looked up by fidomonth(), a new helper in fidopkt.h
that the DateTime plausibility check now shares (so that check also
matches month names case-insensitively, as fmsgtime() always has). An
unknown month still means December.
Co-Authored-By: Claude Opus 5.5 <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net