found out why the "start date" was different in the general header and the first trace:

the date is constructed from a number of days since Jan 1 of the `year`, so this line:

date = datetime.datetime(year, 1, 1) + datetime.timedelta(days=day_lsb3)

needs to be

date = datetime.datetime(year, 1, 1) + datetime.timedelta(days=day_lsb3-1)

because day number 1 is Jan 1, not Jan 2 !