Repository navigation
Bench484 eod called twice - #795
Open
danielhunter22 wants to merge 2 commits into
Open
danielhunter22 wants to merge 2 commits into
danielhunter22 wants to merge 2 commits into
Conversation
getroll converted the roll time to UTC using the timezone offset at the time of calculation, not at the time the roll runs. When clocks changed between the two, the next roll was stored an hour out, so EOD fired early and then again (e.g. America/New_York, autumn: 21:10 UTC stored instead of 22:10 UTC). - getroll: calculate the next roll in the roll timezone, then convert to UTC with .tz.gl so the offset at the roll time is used
luke-holmes
reviewed
Dec 4, 2026
| -load ${KDBTESTS}/helperfunctions.q ${testpath}/settings.q \ | ||
| -results ${KDBTESTS}/stp/results/ \ | ||
| -procfile ${testpath}/process.csv \ | ||
| -debug \ |
There was a problem hiding this comment.
think this is left from your testing if you can remove
luke-holmes
reviewed
Dec 4, 2026
| run,0,0,q,now:.z.p,1,,"Get current time" | ||
| run,0,0,q,data:stpHandle".stplg.endofdaydata[]",1,,"get data" | ||
| run,0,0,q,"stpHandle(`.stplg.stpeod;.eodtime.d;data,(enlist `p)!enlist now)",1,,"Run EoD function on STP" | ||
| run,0,0,q,"stpHandle(`.stplg.endofday;.eodtime.d;data,(enlist `p)!enlist now)",1,,"Run EoD function on STP" |
There was a problem hiding this comment.
Can you add some unit tests to cover the getroll behaviour we are making the fix for?
e.g. around midnight when the clocks change in NY/London/both
luke-holmes
reviewed
Dec 4, 2026
|
|
||
| // function to determine the date (in rolltimezone) from UTC timestamp, p | ||
| getday:{[p] | ||
| p+:adjtime[p]; // convert date from UTC to rolltimezone |
There was a problem hiding this comment.
I think it may be an issue that you removed adjtime use in getroll but is left here, can we update this with the new use of .tz.lg[rolltimezone;p] too?
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bench484-EOD-Called-Twice: TorQ Issue 559
(link to issue raised: #559)
Problem
With
rolltimezoneset to (America/New_York,rolltimeoffset-0D06:50), EOD runs twice when the clocks go back. The next roll is calculated just after the previous EOD, using the timezone offset at that moment (summer time). By the time the roll runs the clocks have changed, so the stored UTC time is an hour out:Changes (code/common/eodtime.q)
getroll: calculates the next roll in the roll timezone, then converts to UTC with.tz.gl, so the offset used is the one valid at the roll time.quick checks
Screenshot showing successful unit tests for EOD.
