quickfix icon indicating copy to clipboard operation
quickfix copied to clipboard

MSSQL script: Wrong data type for creation_time

Open TatuMon opened this issue 1 year ago • 2 comments

My problem

Today I found out that, while the creation_time is saved following the specified timezone set in the configuration, it's not saving the timezone in the database, what makes StateMachine.CheckSessionTime behave weird.

How I found out

Config

  • BeginString=FIXT.1.1
  • StartTime=09:40:00
  • EndTime=19:00:00
  • Weekdays=Mon,Tue,Wed,Thu,Fri
  • TimeZone=Local (which is UTC-3 in the machine where I found this)
  • ... more

Initially, my session was created with creation_time set at "2024-08-20 12:35:37.787", which is fine, but the session kept resetting and I found out that if I set StartTime=09:35:37 (or before) it works.

I assume this is because creation_time doesn't specify timezone, what makes the code assume it is in UTC and reduce 3 hours from it, thus making creation_time out of range

TatuMon avatar Aug 20 '24 17:08 TatuMon