make reference time configurable

This commit is contained in:
2025-09-25 21:22:07 +02:00
parent 25138cc144
commit 908ededbcc
2 changed files with 17 additions and 4 deletions

View File

@@ -45,9 +45,10 @@ func NewTP(conf *Config, ref ...time.Time) *TimestampProccessor {
modnow.TimeFormats = append(modnow.TimeFormats, formats...)
tp := &TimestampProccessor{Config: *conf, Reference: time.Now()}
tp := &TimestampProccessor{Config: *conf, Reference: conf.refTime}
if len(ref) == 1 {
// overwritten externally by unit test
tp.Reference = ref[0]
}