Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 21 additions & 0 deletions session_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading