Skip to content

EOD Called Twice #559

@CormacRoss

Description

@CormacRoss

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions