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

Time remaining not shown when less than a day remains until event date #1

Open
rudybrian opened this issue Dec 24, 2017 · 1 comment

Comments

@rudybrian
Copy link

rudybrian commented Dec 24, 2017

I just noticed this morning as there is less than 24 hours until the event date of 2017-12-25 00:00:00, that something was amiss and no time remaining is being shown. Here are the logs from a recent run:

2017-12-24 10:04:38 AM: ==20462== Lock acquired, processing the job...
2017-12-24 10:04:38 AM: event date: 2017-12-25 0:0:00
2017-12-24 10:04:38 AM: Difference between 2017-12-25 00:00:00 and 2017-12-24 10:04:38 is:0.0015893581938102 years 0 days 13 hours 55 minutes
2017-12-24 10:04:38 AM: Adding message It is until Christmas to message queue
2017-12-24 10:04:38 AM: Message file passed: 
2017-12-24 10:04:38 AM: MESSAGEQUEUE_PLUGIN: Message queue file: /home/fpp/media/config/FPP.MessageQueue.db
2017-12-24 10:04:38 AM: MESSAGEQUEUE_PLUGIN: Adding message to message queue: It is until Christmas :EventDate :Christmas
2017-12-24 10:04:38 AM: IMMEDIATE OUTPUT ENABLED
2017-12-24 10:04:38 AM: Matrix location: 127.0.0.1
2017-12-24 10:04:38 AM: Matrix Exec page: matrix.php
2017-12-24 10:04:38 AM: MATRIX ACTIVE: 1
2017-12-24 10:04:38 AM: Curl result: 
2017-12-24 10:04:38 AM: ==20462== Releasing lock...

@rudybrian
Copy link
Author

rudybrian commented Dec 24, 2017

By manually enabling include hours and include minutes, it has worked around the issue.

I checked the code, and there is no specific logic to address the remaining time < 1 day condition as implied by the UI. It might make sense to do something like before line 110:

if (((int) $d < 1) && ((int) $d > 0)) {
	$INCLUDE_HOURS = "ON";
	$INCLUDE_MINUTES = "ON";
}

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