Skip to content

[Bug]: Active Times gets confused if end time passes over into next day #214

@rorosaurus

Description

@rorosaurus

Description of the bug

At 11am, I noticed the lights still weren't on. If I disabled active times, the lights came on. Enabling active times, lights went off.

On a hunch, I changed the end time to 11pm, and the lights worked as expected. So I suspect there's a minor bug in the active time code that gets confused if the end time proceeds to the next day.

I verified this wasn't timezone related, confirmed correct time zone and time reported by date command.

Steps to reproduce

Active Time Settings used:
Start Time: 8am
End Time: 1am

Expected on time range: 8am-1am (implied next day)
Expected off time range: 1am-8am
Lights checked at: 11am

What happened instead?

Lights remained off during a time when they should be enabled.

Plugin version

0.8.1

OctoPrint version

1.8.7

(if relevant) OctoPi version

1.0.0

Log Files & Screenshots

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    potential bugBug reported but yet to be analysed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions