Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EOD Called Twice #559

Open
CormacRoss opened this issue Mar 14, 2023 · 0 comments
Open

EOD Called Twice #559

CormacRoss opened this issue Mar 14, 2023 · 0 comments

Comments

@CormacRoss
Copy link
Contributor

With the following config to save down at 17:10 EST, eod gets called twice when EST clocks change in Autumn:

.eodtime.rolltimeoffset:-0D06:50:00.000000000
.eodtime.rolltimezone:`$"America/New_York"

Specific example:

1. On Saturday 2020.10.31 save down happens correctly and as expected at 21.10 UCT (17.10 EST)

2. The next EOD gets scheduled for 2020.11.01D21:10:00.000000000:
q)p:2020.10.31D21:10:01.000000000
q)z:.eodtime.rolltimeoffset-exec adjustment from .tz.t asof `timezoneID`gmtDateTime!(.eodtime.rolltimezone;p)                          
q)z:`timespan$(mod) . "j"$z, 1D
q)("d"$p) + $[z <= p;z+1D;z]                             
2020.11.01D21:10:00.000000000

3. Overnight the clocks go back one hour

4. On Sunday EOD is incorrectly called one hour early at 21.10 UTC (16:10 EST)

5. The next EOD is scheduled 1 hour later for 2020.11.01D22:10:00.000000000 (17:10 EST)
q)p:2020.11.01D21:10:01.000000000
q)z:.eodtime.rolltimeoffset-exec adjustment from .tz.t asof `timezoneID`gmtDateTime!(.eodtime.rolltimezone;p)                          
q)z:`timespan$(mod) . "j"$z, 1D
q)("d"$p) + $[z <= p;z+1D;z] 
2020.11.01D22:10:00.000000000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant