rolltime in different timezone causes endofday error
Closed this issue · 3 comments
existing code assume columns be GMT
/-change timeout to zero before eod flush .timer.repeat[.eodtime.nextroll-00:01;0W;1D; (
.rdb.timeoutreset;);"Set rdb timeout to 0 for EOD writedown"];
I had issue when the .eodtime.rolltimezone is set to be differently
e.g when i roll data after US market closed (18:00 NYTime, which .eodtime.nextroll=D23:00:00 in UTC)
when tp trigger to load at 18:00, .rdb.timeoutreset has not yet triggered, so .rdb.timeout is not defined and error out during endofday process when trying to restore timeout.
I think the fix should be:
.timer.repeat[.eodtime.nextroll+.eodtime.adjtime[]-00:01;0W;1D; (
.rdb.timeoutreset;);"Set rdb timeout to 0 for EOD writedown"];
Or without changing the core processes. I load custom appconfig/code/rdb.q after loading the original rdb.q
// Torq rdb assume in GMT, adjust to be in .proc.cp timezone update periodstart:periodstart+.eodtime.adjtime[], nextrun:nextrun+.eodtime.adjtime[] from
.timer.timer where (first each funcparam)=.rdb.timeoutreset;
To be safe, I also define .rdb.timeout:system"T"
in settings/rdb.q
@etennoQ can you pick this up please?
@luilui4320 thank you for the detailed report and the proposed fix!
Hello @luilui4320,
We are currently working on the issue you have raised.
When you got the error, were you using the -localtime flag on the rdb?
Kindest regards
Elliot