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

Periods not properly identified #73

Closed
abbse opened this issue Sep 28, 2016 · 0 comments · Fixed by #74
Closed

Periods not properly identified #73

abbse opened this issue Sep 28, 2016 · 0 comments · Fixed by #74

Comments

@abbse
Copy link

abbse commented Sep 28, 2016

get_period_by_date doesn't properly identify period due wrong condition or timezone used to identify whether datetime is within interval limits specified by TariffPeriod

example:
date_time, 2016-01-01 12:00:00+01:00
date_time.hour, 12
tariffperiod 20DHA, winter, range_h= P1 (12,22), P2 (0,12),(22,24)

interval condition
range_h[0] < hour <= range_h[1]

P1 12 < 12 <= 22 FALSE
P2 0 < 12 <= 12 TRUE
P2 22< 12 <= 24 FALSE

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

Successfully merging a pull request may close this issue.

1 participant