Skip to content

Commit

Permalink
correct dst calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
essweine committed Nov 6, 2023
1 parent c4e7f90 commit 1378127
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SpiffWorkflow/bpmn/specs/event_definitions/timer.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import re
from datetime import datetime, timedelta, timezone
from calendar import monthrange
from time import timezone as tzoffset, altzone as dstoffset, daylight as isdst
from time import timezone as tzoffset, altzone as dstoffset, struct_time, localtime

from SpiffWorkflow.bpmn.event import PendingBpmnEvent
from .base import EventDefinition

seconds_from_utc = dstoffset if isdst else tzoffset
seconds_from_utc = dstoffset if struct_time(localtime()).tm_isdst else tzoffset
LOCALTZ = timezone(timedelta(seconds=-1 * seconds_from_utc))

class TimerEventDefinition(EventDefinition):
Expand Down

0 comments on commit 1378127

Please sign in to comment.