From 400c7425703d4f9fa1e8c7589102015492f91bcc Mon Sep 17 00:00:00 2001 From: Michael Ackley Date: Thu, 31 Jul 2025 11:24:25 -0500 Subject: [PATCH 1/2] Adds missing tz for resetseqtime without starttime endtime --- config/configuration.go | 2 +- session_factory.go | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/config/configuration.go b/config/configuration.go index c2c89b931..1425cde7b 100644 --- a/config/configuration.go +++ b/config/configuration.go @@ -246,7 +246,7 @@ const ( // - Comma delimited list of days of the week in English, or 3 letter abbreviation (e.g. "Monday,Tuesday,Wednesday" or "Mon,Tue,Wed" would both be valid values). Weekdays string = "Weekdays" - // TimeZone sets the time zone for this session; if specified, StartTime and EndTime will be converted from this zone to UTC. + // TimeZone sets the time zone for this session; if specified, StartTime, EndTime, and ResetSeqTime will be converted from this zone to UTC. // Times in messages will still be set to UTC as this is required by FIX specifications. // // Required: No diff --git a/session_factory.go b/session_factory.go index f530ddf14..cf418d587 100644 --- a/session_factory.go +++ b/session_factory.go @@ -352,6 +352,27 @@ func (f sessionFactory) newSession( } if settings.HasSetting(config.ResetSeqTime) { + + if s.TimeZone == nil { + loc := time.UTC + if settings.HasSetting(config.TimeZone) { + var locStr string + if locStr, err = settings.Setting(config.TimeZone); err != nil { + return + } + + loc, err = time.LoadLocation(locStr) + if err != nil { + err = errors.Wrapf( + err, "problem parsing time zone '%v' for setting '%v", + settings.settings[config.TimeZone], config.TimeZone, + ) + return + } + } + s.TimeZone = loc + } + var seqTimeStr string if seqTimeStr, err = settings.Setting(config.ResetSeqTime); err != nil { return From b2ba9cf929e9b1d1f1acb24d9244d9aa13b65877 Mon Sep 17 00:00:00 2001 From: Michael Ackley Date: Thu, 31 Jul 2025 11:28:33 -0500 Subject: [PATCH 2/2] Lint --- session_factory.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/session_factory.go b/session_factory.go index cf418d587..a2291cad7 100644 --- a/session_factory.go +++ b/session_factory.go @@ -372,7 +372,7 @@ func (f sessionFactory) newSession( } s.TimeZone = loc } - + var seqTimeStr string if seqTimeStr, err = settings.Setting(config.ResetSeqTime); err != nil { return